summaryrefslogtreecommitdiff
path: root/docs/classTiXmlAttribute.html
blob: 1b4db51d7c2c185d2dace612091270d25950df51 (plain)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>TinyXml: TiXmlAttribute Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div>
<h1>TiXmlAttribute Class Reference</h1><!-- doxytag: class="TiXmlAttribute" --><!-- doxytag: inherits="TiXmlBase" -->An attribute is a name-value pair.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</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 Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0"></a><!-- doxytag: member="TiXmlAttribute::TiXmlAttribute" ref="a0" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a0">TiXmlAttribute</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an empty attribute. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member="TiXmlAttribute::TiXmlAttribute" ref="a1" args="(const std::string &amp;_name, const std::string &amp;_value)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a1">TiXmlAttribute</a> (const std::string &amp;_name, const std::string &amp;_value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">std::string constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="TiXmlAttribute::TiXmlAttribute" ref="a2" args="(const char *_name, const char *_value)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a2">TiXmlAttribute</a> (const char *_name, const char *_value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an attribute with a name and value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3"></a><!-- doxytag: member="TiXmlAttribute::Name" ref="a3" args="() const " -->
const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a3">Name</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the name of this attribute. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4"></a><!-- doxytag: member="TiXmlAttribute::Value" ref="a4" args="() const " -->
const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a4">Value</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the value of this attribute. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5"></a><!-- doxytag: member="TiXmlAttribute::IntValue" ref="a5" args="() const " -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a5">IntValue</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the value of this attribute, converted to an integer. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6"></a><!-- doxytag: member="TiXmlAttribute::DoubleValue" ref="a6" args="() const " -->
double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a6">DoubleValue</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the value of this attribute, converted to a double. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a7">QueryIntValue</a> (int *_value) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">QueryIntValue examines the value string.  <a href="#a7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8"></a><!-- doxytag: member="TiXmlAttribute::QueryDoubleValue" ref="a8" args="(double *_value) const " -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a8">QueryDoubleValue</a> (double *_value) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">QueryDoubleValue examines the value string. See <a class="el" href="classTiXmlAttribute.html#a7">QueryIntValue()</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9"></a><!-- doxytag: member="TiXmlAttribute::SetName" ref="a9" args="(const char *_name)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a9">SetName</a> (const char *_name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the name of this attribute. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10"></a><!-- doxytag: member="TiXmlAttribute::SetValue" ref="a10" args="(const char *_value)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a10">SetValue</a> (const char *_value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a11"></a><!-- doxytag: member="TiXmlAttribute::SetIntValue" ref="a11" args="(int _value)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a11">SetIntValue</a> (int _value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the value from an integer. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12"></a><!-- doxytag: member="TiXmlAttribute::SetDoubleValue" ref="a12" args="(double _value)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a12">SetDoubleValue</a> (double _value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the value from a double. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a13"></a><!-- doxytag: member="TiXmlAttribute::SetName" ref="a13" args="(const std::string &amp;_name)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a13">SetName</a> (const std::string &amp;_name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a14"></a><!-- doxytag: member="TiXmlAttribute::SetValue" ref="a14" args="(const std::string &amp;_value)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a14">SetValue</a> (const std::string &amp;_value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a15"></a><!-- doxytag: member="TiXmlAttribute::Next" ref="a15" args="() const " -->
const <a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a15">Next</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the next sibling attribute in the DOM. Returns null at end. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a17"></a><!-- doxytag: member="TiXmlAttribute::Previous" ref="a17" args="() const " -->
const <a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a17">Previous</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the previous sibling attribute in the DOM. Returns null at beginning. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a23">Print</a> (FILE *cfile, int depth) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All TinyXml classes can print themselves to a filestream.  <a href="#a23"></a><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.</dd></dl>

<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a23"></a><!-- doxytag: member="TiXmlAttribute::Print" ref="a23" args="(FILE *cfile, int depth) const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">virtual void TiXmlAttribute::Print           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">FILE *&nbsp;</td>
          <td class="mdname" nowrap> <em>cfile</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>depth</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</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>
      &nbsp;
    </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 &lt;&lt; operator.)
<p>
Implements <a class="el" href="classTiXmlBase.html#a2">TiXmlBase</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a7"></a><!-- doxytag: member="TiXmlAttribute::QueryIntValue" ref="a7" args="(int *_value) const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int TiXmlAttribute::QueryIntValue           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>_value</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </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 size="1"><address style="align: right;"><small>Generated on Sat Oct 8 14:15:30 2005 for TinyXml by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>