1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
|
<HTML>
<HEAD>
<TITLE>class TiXmlElement</TITLE>
<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
<TABLE BORDER="0">
<TR><TD valign="top" align="left" cellspacing="10">
<h1>class TiXmlElement</h1>
</TD>
<TD valign="top" align="right" colspan="1"> The element is a container class. <small><A HREF="#longdesc">More...</A></small></TD></TR>
</TABLE>
<HR>
<TABLE BORDER="0">
<TR><TH>Full name</TH><TD><code><A HREF="TelEngine.html">TelEngine</A>::TiXmlElement</code></TD></TR>
<TR><TH>Definition</TH><TD><code>#include <<A HREF="libs___yxml___tinyxml_h.html">libs/yxml/tinyxml.h</A>></code></TD></TR>
<TR><TH>Inherits</TH><TD><i><A HREF="TelEngine__TiXmlNode.html">TelEngine::TiXmlNode</A></i> <small>[public ]</small></TD></TR>
<TR><TH><A HREF="full-list-TelEngine__TiXmlElement.html">List of all Methods</A></TH></TR>
</TABLE>
</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI> <b><A HREF="#ref1">TiXmlElement</A></b> (const char * in_value)
</LI>
<LI> <b><A HREF="#ref2">TiXmlElement</A></b> ( const std::string& _value )
</LI>
<LI> <b><A HREF="#ref3">TiXmlElement</A></b> ( const TiXmlElement& )
</LI>
<LI>void <b><A HREF="#ref4">operator=</A></b> ( const TiXmlElement& base )
</LI>
<LI>virtual <b><A HREF="#ref5">~TiXmlElement</A></b> ()
</LI>
<LI>const char* <b><A HREF="#ref6">Attribute</A></b> ( const char* name ) const
</LI>
<LI>const char* <b><A HREF="#ref7">Attribute</A></b> ( const char* name, int* i ) const
</LI>
<LI>const char* <b><A HREF="#ref8">Attribute</A></b> ( const char* name, double* d ) const
</LI>
<LI>int <b><A HREF="#ref9">QueryIntAttribute</A></b> ( const char* name, int* _value ) const
</LI>
<LI>int <b><A HREF="#ref10">QueryDoubleAttribute</A></b> ( const char* name, double* _value ) const
</LI>
<LI>int <b><A HREF="#ref11">QueryFloatAttribute</A></b> ( const char* name, float* _value ) const
</LI>
<LI>void <b><A HREF="#ref12">SetAttribute</A></b> ( const char* name, const char * _value )
</LI>
<LI>const char* <b><A HREF="#ref13">Attribute</A></b> ( const std::string& name ) const
</LI>
<LI>const char* <b><A HREF="#ref14">Attribute</A></b> ( const std::string& name, int* i ) const
</LI>
<LI>const char* <b><A HREF="#ref15">Attribute</A></b> ( const std::string& name, double* d ) const
</LI>
<LI>int <b><A HREF="#ref16">QueryIntAttribute</A></b> ( const std::string& name, int* _value ) const
</LI>
<LI>int <b><A HREF="#ref17">QueryDoubleAttribute</A></b> ( const std::string& name, double* _value ) const
</LI>
<LI>void <b><A HREF="#ref18">SetAttribute</A></b> ( const std::string& name, const std::string& _value )
</LI>
<LI>void <b><A HREF="#ref19">SetAttribute</A></b> ( const std::string& name, int _value )
</LI>
<LI>void <b><A HREF="#ref20">SetAttribute</A></b> ( const char * name, int value )
</LI>
<LI>void <b><A HREF="#ref21">SetDoubleAttribute</A></b> ( const char * name, double value )
</LI>
<LI>void <b><A HREF="#ref22">RemoveAttribute</A></b> ( const char * name )
</LI>
<LI>void <b><A HREF="#ref23">RemoveAttribute</A></b> ( const std::string& name )
</LI>
<LI>const TiXmlAttribute* <b><A HREF="#ref24">FirstAttribute</A></b> () const
</LI>
<LI>TiXmlAttribute* <b><A HREF="#ref25">FirstAttribute</A></b> ()
</LI>
<LI>const TiXmlAttribute* <b><A HREF="#ref26">LastAttribute</A></b> () const
</LI>
<LI>TiXmlAttribute* <b><A HREF="#ref27">LastAttribute</A></b> ()
</LI>
<LI>const char* <b><A HREF="#ref28">GetText</A></b> () const
</LI>
<LI>virtual TiXmlNode* <b><A HREF="#ref29">Clone</A></b> () const
</LI>
<LI>virtual void <b><A HREF="#ref30">Print</A></b> ( FILE* cfile, int depth ) const
</LI>
<LI>virtual const char* <b><A HREF="#ref31">Parse</A></b> ( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
</LI>
<LI>virtual const TiXmlElement* <b><A HREF="#ref32">ToElement</A></b> () const
</LI>
<LI>virtual TiXmlElement* <b><A HREF="#ref33">ToElement</A></b> ()
</LI>
<LI>virtual void <b><A HREF="#ref37">StreamOut</A></b> ( TIXML_OSTREAM * out, bool unclosed = false ) const
</LI>
<LI>const char* <b><A HREF="#ref38">ReadValue</A></b> ( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding )
</LI>
</ul><h4>Protected Methods</h4><ul><LI>void <b><A HREF="#ref34">CopyTo</A></b> ( TiXmlElement* target ) const
</LI>
<LI>void <b><A HREF="#ref35">ClearThis</A></b> ()
</LI>
<LI>virtual void <b><A HREF="#ref36">StreamIn</A></b> ( TIXML_ISTREAM * in, TIXML_STRING * tag )
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p> The element is a container class. It has a value, the element name,
and can contain other elements, text, comments, and unknowns.
Elements also contain an arbitrary number of attributes.
</p>
<A NAME="TiXmlElement"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>TiXmlElement</strong> (const char * in_value)
<br></td><td align="right"><h3><strong>TiXmlElement</strong></h3></td></tr></table><p></p><A NAME="TiXmlElement"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>TiXmlElement</strong> ( const std::string& _value )
<br></td><td align="right"><h3><strong>TiXmlElement</strong></h3></td></tr></table><p></p><A NAME="TiXmlElement"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>TiXmlElement</strong> ( const TiXmlElement& )
<br></td><td align="right"><h3><strong>TiXmlElement</strong></h3></td></tr></table><p></p><A NAME="operator="></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>operator=</strong> ( const TiXmlElement& base )
<br></td><td align="right"><h3><strong>operator=</strong></h3></td></tr></table><p></p><p>Reimplemented from <A HREF="TelEngine__TiXmlNode.html#operator=">TiXmlNode</A>.</p>
<A NAME="~TiXmlElement"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>~TiXmlElement</strong> ()
<br></td><td align="right"><h3><strong>~TiXmlElement</strong></h3></td></tr></table><p> <small>[virtual]</small></p><A NAME="Attribute"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const char* <strong>Attribute</strong> ( const char* name )
<br></td><td align="right"><h3><strong>Attribute</strong></h3></td></tr></table><p> <small>[const]</small></p><p> Given an attribute name, Attribute() returns the value
for the attribute of that name, or null if none exists.
</p>
<A NAME="Attribute"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const char* <strong>Attribute</strong> ( const char* name, int* i )
<br></td><td align="right"><h3><strong>Attribute</strong></h3></td></tr></table><p> <small>[const]</small></p><p> Given an attribute name, Attribute() returns the value
for the attribute of that name, or null if none exists.
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.
</p>
<A NAME="Attribute"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const char* <strong>Attribute</strong> ( const char* name, double* d )
<br></td><td align="right"><h3><strong>Attribute</strong></h3></td></tr></table><p> <small>[const]</small></p><p> Given an attribute name, Attribute() returns the value
for the attribute of that name, or null if none exists.
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.
</p>
<A NAME="QueryIntAttribute"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int <strong>QueryIntAttribute</strong> ( const char* name, int* _value )
<br></td><td align="right"><h3><strong>QueryIntAttribute</strong></h3></td></tr></table><p> <small>[const]</small></p><p> QueryIntAttribute examines the attribute - it is an alternative to the
Attribute() method with richer error checking.
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.
</p>
<A NAME="QueryDoubleAttribute"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int <strong>QueryDoubleAttribute</strong> ( const char* name, double* _value )
<br></td><td align="right"><h3><strong>QueryDoubleAttribute</strong></h3></td></tr></table><p> <small>[const]</small></p><A NAME="QueryFloatAttribute"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int <strong>QueryFloatAttribute</strong> ( const char* name, float* _value )
<br></td><td align="right"><h3><strong>QueryFloatAttribute</strong></h3></td></tr></table><p> <small>[const]</small></p><A NAME="SetAttribute"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>SetAttribute</strong> ( const char* name, const char * _value )
<br></td><td align="right"><h3><strong>SetAttribute</strong></h3></td></tr></table><p></p><p> Sets an attribute of name to a given value. The attribute
will be created if it does not exist, or changed if it does.
</p>
<A NAME="Attribute"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const char* <strong>Attribute</strong> ( const std::string& name )
<br></td><td align="right"><h3><strong>Attribute</strong></h3></td></tr></table><p> <small>[const]</small></p><A NAME="Attribute"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const char* <strong>Attribute</strong> ( const std::string& name, int* i )
<br></td><td align="right"><h3><strong>Attribute</strong></h3></td></tr></table><p> <small>[const]</small></p><A NAME="Attribute"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const char* <strong>Attribute</strong> ( const std::string& name, double* d )
<br></td><td align="right"><h3><strong>Attribute</strong></h3></td></tr></table><p> <small>[const]</small></p><A NAME="QueryIntAttribute"></A><A NAME="ref16"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int <strong>QueryIntAttribute</strong> ( const std::string& name, int* _value )
<br></td><td align="right"><h3><strong>QueryIntAttribute</strong></h3></td></tr></table><p> <small>[const]</small></p><A NAME="QueryDoubleAttribute"></A><A NAME="ref17"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int <strong>QueryDoubleAttribute</strong> ( const std::string& name, double* _value )
<br></td><td align="right"><h3><strong>QueryDoubleAttribute</strong></h3></td></tr></table><p> <small>[const]</small></p><A NAME="SetAttribute"></A><A NAME="ref18"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>SetAttribute</strong> ( const std::string& name, const std::string& _value )
<br></td><td align="right"><h3><strong>SetAttribute</strong></h3></td></tr></table><p></p><A NAME="SetAttribute"></A><A NAME="ref19"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>SetAttribute</strong> ( const std::string& name, int _value )
<br></td><td align="right"><h3><strong>SetAttribute</strong></h3></td></tr></table><p></p><A NAME="SetAttribute"></A><A NAME="ref20"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>SetAttribute</strong> ( const char * name, int value )
<br></td><td align="right"><h3><strong>SetAttribute</strong></h3></td></tr></table><p></p><p> Sets an attribute of name to a given value. The attribute
will be created if it does not exist, or changed if it does.
</p>
<A NAME="SetDoubleAttribute"></A><A NAME="ref21"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>SetDoubleAttribute</strong> ( const char * name, double value )
<br></td><td align="right"><h3><strong>SetDoubleAttribute</strong></h3></td></tr></table><p></p><p> Sets an attribute of name to a given value. The attribute
will be created if it does not exist, or changed if it does.
</p>
<A NAME="RemoveAttribute"></A><A NAME="ref22"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>RemoveAttribute</strong> ( const char * name )
<br></td><td align="right"><h3><strong>RemoveAttribute</strong></h3></td></tr></table><p></p><p> Deletes an attribute with the given name.
</p>
<A NAME="RemoveAttribute"></A><A NAME="ref23"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>RemoveAttribute</strong> ( const std::string& name )
<br></td><td align="right"><h3><strong>RemoveAttribute</strong></h3></td></tr></table><p></p><A NAME="FirstAttribute"></A><A NAME="ref24"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const TiXmlAttribute* <strong>FirstAttribute</strong> ()
<br></td><td align="right"><h3><strong>FirstAttribute</strong></h3></td></tr></table><p> <small>[const]</small></p><A NAME="FirstAttribute"></A><A NAME="ref25"></A><table width="100%"><tr bgcolor="#eeeeee"><td>TiXmlAttribute* <strong>FirstAttribute</strong> ()
<br></td><td align="right"><h3><strong>FirstAttribute</strong></h3></td></tr></table><p></p><A NAME="LastAttribute"></A><A NAME="ref26"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const TiXmlAttribute* <strong>LastAttribute</strong> ()
<br></td><td align="right"><h3><strong>LastAttribute</strong></h3></td></tr></table><p> <small>[const]</small></p><A NAME="LastAttribute"></A><A NAME="ref27"></A><table width="100%"><tr bgcolor="#eeeeee"><td>TiXmlAttribute* <strong>LastAttribute</strong> ()
<br></td><td align="right"><h3><strong>LastAttribute</strong></h3></td></tr></table><p></p><A NAME="GetText"></A><A NAME="ref28"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const char* <strong>GetText</strong> ()
<br></td><td align="right"><h3><strong>GetText</strong></h3></td></tr></table><p> <small>[const]</small></p><p> Convenience function for easy access to the text inside an element. Although easy
and concise, GetText() is limited compared to getting the TiXmlText child
and accessing it directly.
</p>
<p> If the first child of 'this' is a TiXmlText, the GetText()
returns the character string of the Text node, else null is returned.
</p>
<p> This is a convenient method for getting the text of simple contained text:
@verbatim
<foo>This is text</foo>
const char* str = fooElement->GetText();
@endverbatim
</p>
<p> 'str' will be a pointer to "This is text".
</p>
<p> Note that this function can be misleading. If the element foo was created from
this XML:
@verbatim
<foo><b>This is text</b></foo>
@endverbatim
</p>
<p> then the value of str would be null. The first child node isn't a text node, it is
another element. From this XML:
@verbatim
<foo>This is <b>text</b></foo>
@endverbatim
GetText() will return "This is ".
</p>
<p> WARNING: GetText() accesses a child node - don't become confused with the
similarly named TiXmlHandle::Text() and TiXmlNode::ToText() which are
safe type casts on the referenced node.
</p>
<A NAME="Clone"></A><A NAME="ref29"></A><table width="100%"><tr bgcolor="#eeeeee"><td> TiXmlNode* <strong>Clone</strong> ()
<br></td><td align="right"><h3><strong>Clone</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>Reimplemented from <A HREF="TelEngine__TiXmlNode.html#Clone">TiXmlNode</A>.</p>
<A NAME="Print"></A><A NAME="ref30"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>Print</strong> ( FILE* cfile, int depth )
<br></td><td align="right"><h3><strong>Print</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>Reimplemented from <A HREF="TelEngine__TiXmlBase.html#Print">TiXmlBase</A>.</p>
<A NAME="Parse"></A><A NAME="ref31"></A><table width="100%"><tr bgcolor="#eeeeee"><td> const char* <strong>Parse</strong> ( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
<br></td><td align="right"><h3><strong>Parse</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>Reimplemented from <A HREF="TelEngine__TiXmlBase.html#Parse">TiXmlBase</A>.</p>
<A NAME="ToElement"></A><A NAME="ref32"></A><table width="100%"><tr bgcolor="#eeeeee"><td> const TiXmlElement* <strong>ToElement</strong> ()
<br></td><td align="right"><h3><strong>ToElement</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>Reimplemented from <A HREF="TelEngine__TiXmlNode.html#ToElement">TiXmlNode</A>.</p>
<A NAME="ToElement"></A><A NAME="ref33"></A><table width="100%"><tr bgcolor="#eeeeee"><td> TiXmlElement* <strong>ToElement</strong> ()
<br></td><td align="right"><h3><strong>ToElement</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>Reimplemented from <A HREF="TelEngine__TiXmlNode.html#ToElement">TiXmlNode</A>.</p>
<A NAME="CopyTo"></A><A NAME="ref34"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>CopyTo</strong> ( TiXmlElement* target )
<br></td><td align="right"><h3><strong>CopyTo</strong></h3></td></tr></table><p> <small>[protected const]</small></p><p>Reimplemented from <A HREF="TelEngine__TiXmlNode.html#CopyTo">TiXmlNode</A>.</p>
<A NAME="ClearThis"></A><A NAME="ref35"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>ClearThis</strong> ()
<br></td><td align="right"><h3><strong>ClearThis</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="StreamIn"></A><A NAME="ref36"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>StreamIn</strong> ( TIXML_ISTREAM * in, TIXML_STRING * tag )
<br></td><td align="right"><h3><strong>StreamIn</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>Reimplemented from <A HREF="TelEngine__TiXmlNode.html#StreamIn">TiXmlNode</A>.</p>
<A NAME="StreamOut"></A><A NAME="ref37"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>StreamOut</strong> ( TIXML_OSTREAM * out, bool unclosed = false )
<br></td><td align="right"><h3><strong>StreamOut</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>Reimplemented from <A HREF="TelEngine__TiXmlBase.html#StreamOut">TiXmlBase</A>.</p>
<A NAME="ReadValue"></A><A NAME="ref38"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const char* <strong>ReadValue</strong> ( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding )
<br></td><td align="right"><h3><strong>ReadValue</strong></h3></td></tr></table><p></p><HR>
<table>
<tr><td><small>Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54.</small></td></tr>
</table>
</BODY>
</HTML>
|