<html> <head> <title>Cal3D: cal3d::TiXmlElement Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center"> <tr> <td class="md" align="center"> <small> <b>- Cal3D 0.11 API Reference -</b> </small> </td> </tr> </table> <br> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><b>cal3d</b>::<a class="el" href="classcal3d_1_1TiXmlElement.html">TiXmlElement</a> </div> </div> <div class="contents"> <h1>cal3d::TiXmlElement Class Reference</h1><!-- doxytag: class="cal3d::TiXmlElement" --><!-- doxytag: inherits="cal3d::TiXmlNode" -->The element is a container class. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="tinyxml_8h_source.html">tinyxml.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for cal3d::TiXmlElement:</div> <div class="dynsection"> <p><center><img src="classcal3d_1_1TiXmlElement.png" usemap="#cal3d::TiXmlElement_map" border="0" alt=""></center> <map name="cal3d::TiXmlElement_map"> <area href="classcal3d_1_1TiXmlNode.html" alt="cal3d::TiXmlNode" shape="rect" coords="0,56,124,80"> <area href="classcal3d_1_1TiXmlBase.html" alt="cal3d::TiXmlBase" shape="rect" coords="0,0,124,24"> </map> </div> <p> <a href="classcal3d_1_1TiXmlElement-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 Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3fd5fca4b7fa97e250ae7bf3c79b8924"></a><!-- doxytag: member="cal3d::TiXmlElement::TiXmlElement" ref="3fd5fca4b7fa97e250ae7bf3c79b8924" args="(const char *in_value)" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#3fd5fca4b7fa97e250ae7bf3c79b8924">TiXmlElement</a> (const char *in_value)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct an element. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8430e9f10c9a011544b5cc527712719b"></a><!-- doxytag: member="cal3d::TiXmlElement::TiXmlElement" ref="8430e9f10c9a011544b5cc527712719b" args="(const std::string &_value)" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#8430e9f10c9a011544b5cc527712719b">TiXmlElement</a> (const std::string &_value)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">std::string constructor. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="26bba99842faec7be161c2943ff2e917"></a><!-- doxytag: member="cal3d::TiXmlElement::Attribute" ref="26bba99842faec7be161c2943ff2e917" args="(const char *name) const " --> const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#26bba99842faec7be161c2943ff2e917">Attribute</a> (const char *name) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given an attribute name, <a class="el" href="classcal3d_1_1TiXmlElement.html#26bba99842faec7be161c2943ff2e917" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> returns the value for the attribute of that name, or null if none exists. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#b76dbffc844f0cc1a1fae0ac50a75cc8">Attribute</a> (const char *name, int *i) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given an attribute name, <a class="el" href="classcal3d_1_1TiXmlElement.html#26bba99842faec7be161c2943ff2e917" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> returns the value for the attribute of that name, or null if none exists. <a href="#b76dbffc844f0cc1a1fae0ac50a75cc8"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#0decac3e3d4b3f15abe64cae57693d5f">Attribute</a> (const char *name, double *d) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given an attribute name, <a class="el" href="classcal3d_1_1TiXmlElement.html#26bba99842faec7be161c2943ff2e917" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> returns the value for the attribute of that name, or null if none exists. <a href="#0decac3e3d4b3f15abe64cae57693d5f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#17f1ff5281af8c89b47daa1dc10b4b94">QueryIntAttribute</a> (const char *name, int *value) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">QueryIntAttribute examines the attribute - it is an alternative to the <a class="el" href="classcal3d_1_1TiXmlElement.html#26bba99842faec7be161c2943ff2e917" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> method with richer error checking. <a href="#17f1ff5281af8c89b47daa1dc10b4b94"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="83c33e6e90ff6674dcf3f08cf71133fc"></a><!-- doxytag: member="cal3d::TiXmlElement::QueryDoubleAttribute" ref="83c33e6e90ff6674dcf3f08cf71133fc" args="(const char *name, double *value) const " --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#83c33e6e90ff6674dcf3f08cf71133fc">QueryDoubleAttribute</a> (const char *name, double *value) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">QueryDoubleAttribute examines the attribute - see <a class="el" href="classcal3d_1_1TiXmlElement.html#17f1ff5281af8c89b47daa1dc10b4b94" title="QueryIntAttribute examines the attribute - it is an alternative to the Attribute()...">QueryIntAttribute()</a>. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#81ffb6c93fdd23c99f0287d6c7aeb196">SetAttribute</a> (const char *name, const char *value)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets an attribute of name to a given value. <a href="#81ffb6c93fdd23c99f0287d6c7aeb196"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7bef93cf56197d42fdd0060a2d915a88"></a><!-- doxytag: member="cal3d::TiXmlElement::Attribute" ref="7bef93cf56197d42fdd0060a2d915a88" args="(const std::string &name) const " --> const char * </td><td class="memItemRight" valign="bottom"><b>Attribute</b> (const std::string &name) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0e94fb4cade20e41a8efab8e3d6be318"></a><!-- doxytag: member="cal3d::TiXmlElement::Attribute" ref="0e94fb4cade20e41a8efab8e3d6be318" args="(const std::string &name, int *i) const " --> const char * </td><td class="memItemRight" valign="bottom"><b>Attribute</b> (const std::string &name, int *i) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#695c90bcb1b1993a7f70b03e6468c87b">SetAttribute</a> (const std::string &name, const std::string &_value)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="320384c9f38fd389980dabc4dba66d49"></a><!-- doxytag: member="cal3d::TiXmlElement::SetAttribute" ref="320384c9f38fd389980dabc4dba66d49" args="(const std::string &name, int _value)" --> void </td><td class="memItemRight" valign="bottom"><b>SetAttribute</b> (const std::string &name, int _value)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#5b1ece07d63ba4a83d2ba088849366ab">SetAttribute</a> (const char *name, int value)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets an attribute of name to a given value. <a href="#5b1ece07d63ba4a83d2ba088849366ab"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b68dda2c3cc9f9a53b53f70265565a35"></a><!-- doxytag: member="cal3d::TiXmlElement::RemoveAttribute" ref="b68dda2c3cc9f9a53b53f70265565a35" args="(const char *name)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#b68dda2c3cc9f9a53b53f70265565a35">RemoveAttribute</a> (const char *name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes an attribute with the given name. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b780bcb09df5e7a278332f1075879790"></a><!-- doxytag: member="cal3d::TiXmlElement::RemoveAttribute" ref="b780bcb09df5e7a278332f1075879790" args="(const std::string &name)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#b780bcb09df5e7a278332f1075879790">RemoveAttribute</a> (const std::string &name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">STL std::string form. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d93b1c9367924e1e9ca1b7b0cbe79615"></a><!-- doxytag: member="cal3d::TiXmlElement::FirstAttribute" ref="d93b1c9367924e1e9ca1b7b0cbe79615" args="() const " --> <a class="el" href="classcal3d_1_1TiXmlAttribute.html">TiXmlAttribute</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#d93b1c9367924e1e9ca1b7b0cbe79615">FirstAttribute</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Access the first attribute in this element. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="235c90943674cb4f2357728c3487c472"></a><!-- doxytag: member="cal3d::TiXmlElement::LastAttribute" ref="235c90943674cb4f2357728c3487c472" args="() const " --> <a class="el" href="classcal3d_1_1TiXmlAttribute.html">TiXmlAttribute</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#235c90943674cb4f2357728c3487c472">LastAttribute</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Access the last attribute in this element. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5aa4be19f65473a602873e60cebb02de"></a><!-- doxytag: member="cal3d::TiXmlElement::Clone" ref="5aa4be19f65473a602873e60cebb02de" args="() const " --> virtual <a class="el" href="classcal3d_1_1TiXmlNode.html">TiXmlNode</a> * </td><td class="memItemRight" valign="bottom"><b>Clone</b> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcal3d_1_1TiXmlElement.html#2806155f7bad2961209dd67af86a0415">Print</a> (FILE *cfile, int depth) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">All TinyXml classes can print themselves to a filestream. <a href="#2806155f7bad2961209dd67af86a0415"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="88c2c9230c7c7f61aa98a19a32974064"></a><!-- doxytag: member="cal3d::TiXmlElement::StreamIn" ref="88c2c9230c7c7f61aa98a19a32974064" args="(TIXML_ISTREAM *in, TIXML_STRING *tag)" --> virtual void </td><td class="memItemRight" valign="bottom"><b>StreamIn</b> (TIXML_ISTREAM *in, TIXML_STRING *tag)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="45095a8aa12067b2948caf72ddbb8c6e"></a><!-- doxytag: member="cal3d::TiXmlElement::StreamOut" ref="45095a8aa12067b2948caf72ddbb8c6e" args="(TIXML_OSTREAM *out) const " --> virtual void </td><td class="memItemRight" valign="bottom"><b>StreamOut</b> (TIXML_OSTREAM *out) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="336007be76c04763611a81bdd76479a8"></a><!-- doxytag: member="cal3d::TiXmlElement::Parse" ref="336007be76c04763611a81bdd76479a8" args="(const char *p, TiXmlParsingData *data)" --> virtual const char * </td><td class="memItemRight" valign="bottom"><b>Parse</b> (const char *p, TiXmlParsingData *data)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="29aac7a3e959597c928eeba9ee7966ef"></a><!-- doxytag: member="cal3d::TiXmlElement::ReadValue" ref="29aac7a3e959597c928eeba9ee7966ef" args="(const char *in, TiXmlParsingData *prevData)" --> const char * </td><td class="memItemRight" valign="bottom"><b>ReadValue</b> (const char *in, TiXmlParsingData *prevData)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> The element is a container class. <p> It has a value, the element name, and can contain other elements, text, comments, and unknowns. Elements also contain an arbitrary number of attributes. <hr><h2>Member Function Documentation</h2> <a class="anchor" name="0decac3e3d4b3f15abe64cae57693d5f"></a><!-- doxytag: member="cal3d::TiXmlElement::Attribute" ref="0decac3e3d4b3f15abe64cae57693d5f" args="(const char *name, double *d) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char * cal3d::TiXmlElement::Attribute </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double * </td> <td class="paramname"> <em>d</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const</td> </tr> </table> </div> <div class="memdoc"> <p> Given an attribute name, <a class="el" href="classcal3d_1_1TiXmlElement.html#26bba99842faec7be161c2943ff2e917" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> returns the value for the attribute of that name, or null if none exists. <p> If the attribute exists and can be converted to an double, the double value will be put in the return 'd', if 'd' is non-null. </div> </div><p> <a class="anchor" name="b76dbffc844f0cc1a1fae0ac50a75cc8"></a><!-- doxytag: member="cal3d::TiXmlElement::Attribute" ref="b76dbffc844f0cc1a1fae0ac50a75cc8" args="(const char *name, int *i) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char * cal3d::TiXmlElement::Attribute </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"> <em>i</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const</td> </tr> </table> </div> <div class="memdoc"> <p> Given an attribute name, <a class="el" href="classcal3d_1_1TiXmlElement.html#26bba99842faec7be161c2943ff2e917" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> returns the value for the attribute of that name, or null if none exists. <p> If the attribute exists and can be converted to an integer, the integer value will be put in the return 'i', if 'i' is non-null. </div> </div><p> <a class="anchor" name="2806155f7bad2961209dd67af86a0415"></a><!-- doxytag: member="cal3d::TiXmlElement::Print" ref="2806155f7bad2961209dd67af86a0415" args="(FILE *cfile, int depth) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void cal3d::TiXmlElement::Print </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"> <em>cfile</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>depth</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <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="classcal3d_1_1TiXmlBase.html#9472a1573c23eb1013160de24a452032">cal3d::TiXmlBase</a>.</p> </div> </div><p> <a class="anchor" name="17f1ff5281af8c89b47daa1dc10b4b94"></a><!-- doxytag: member="cal3d::TiXmlElement::QueryIntAttribute" ref="17f1ff5281af8c89b47daa1dc10b4b94" args="(const char *name, int *value) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int cal3d::TiXmlElement::QueryIntAttribute </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"> <em>value</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td> const</td> </tr> </table> </div> <div class="memdoc"> <p> QueryIntAttribute examines the attribute - it is an alternative to the <a class="el" href="classcal3d_1_1TiXmlElement.html#26bba99842faec7be161c2943ff2e917" title="Given an attribute name, Attribute() returns the value for the attribute of that...">Attribute()</a> method with richer error checking. <p> If the attribute 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. If the attribute does not exist, then TIXML_NO_ATTRIBUTE is returned. </div> </div><p> <a class="anchor" name="5b1ece07d63ba4a83d2ba088849366ab"></a><!-- doxytag: member="cal3d::TiXmlElement::SetAttribute" ref="5b1ece07d63ba4a83d2ba088849366ab" args="(const char *name, int value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void cal3d::TiXmlElement::SetAttribute </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>value</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Sets an attribute of name to a given value. <p> The attribute will be created if it does not exist, or changed if it does. </div> </div><p> <a class="anchor" name="695c90bcb1b1993a7f70b03e6468c87b"></a><!-- doxytag: member="cal3d::TiXmlElement::SetAttribute" ref="695c90bcb1b1993a7f70b03e6468c87b" args="(const std::string &name, const std::string &_value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void cal3d::TiXmlElement::SetAttribute </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"> <em>_value</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> STL std::string form. </div> </div><p> <a class="anchor" name="81ffb6c93fdd23c99f0287d6c7aeb196"></a><!-- doxytag: member="cal3d::TiXmlElement::SetAttribute" ref="81ffb6c93fdd23c99f0287d6c7aeb196" args="(const char *name, const char *value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void cal3d::TiXmlElement::SetAttribute </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>value</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Sets an attribute of name to a given value. <p> The attribute will be created if it does not exist, or changed if it does. </div> </div><p> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="tinyxml_8h_source.html">tinyxml.h</a><li>tinyxml.cpp<li>tinyxmlparser.cpp</ul> </div> <hr> <center> <small> Generated at Fri Jul 24 21:14:57 2009 by <a href="http://gna.org/projects/cal3d/">The Cal3D Team</a> with <a href="http://www.doxygen.org/index.html"> Doxygen 1.5.9 </a> </small> </center> </body> </html>