1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3<title>TinyXml: TiXmlBase Class Reference</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5</head><body> 6<!-- Generated by Doxygen 1.4.4 --> 7<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a></div> 8<h1>TiXmlBase Class Reference</h1><!-- doxytag: class="TiXmlBase" -->TiXmlBase is a base class for every class in TinyXml. 9<a href="#_details">More...</a> 10<p> 11<code>#include <<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>></code> 12<p> 13<p>Inheritance diagram for TiXmlBase: 14<p><center><img src="classTiXmlBase.png" usemap="#TiXmlBase_map" border="0" alt=""></center> 15<map name="TiXmlBase_map"> 16<area href="classTiXmlAttribute.html" alt="TiXmlAttribute" shape="rect" coords="0,56,108,80"> 17<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="295,56,403,80"> 18<area href="classTiXmlComment.html" alt="TiXmlComment" shape="rect" coords="0,112,108,136"> 19<area href="classTiXmlDeclaration.html" alt="TiXmlDeclaration" shape="rect" coords="118,112,226,136"> 20<area href="classTiXmlDocument.html" alt="TiXmlDocument" shape="rect" coords="236,112,344,136"> 21<area href="classTiXmlElement.html" alt="TiXmlElement" shape="rect" coords="354,112,462,136"> 22<area href="classTiXmlText.html" alt="TiXmlText" shape="rect" coords="472,112,580,136"> 23<area href="classTiXmlUnknown.html" alt="TiXmlUnknown" shape="rect" coords="590,112,698,136"> 24</map> 25<a href="classTiXmlBase-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> 26<tr><td></td></tr> 27<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> 28<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a2">Print</a> (FILE *cfile, int depth) const =0</td></tr> 29 30<tr><td class="mdescLeft"> </td><td class="mdescRight">All TinyXml classes can print themselves to a filestream. <a href="#a2"></a><br></td></tr> 31<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a3">Row</a> () const </td></tr> 32 33<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the position, in the original source file, of this node or attribute. <a href="#a3"></a><br></td></tr> 34<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4"></a><!-- doxytag: member="TiXmlBase::Column" ref="a4" args="() const " --> 35int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a4">Column</a> () const </td></tr> 36 37<tr><td class="mdescLeft"> </td><td class="mdescRight">See <a class="el" href="classTiXmlBase.html#a3">Row()</a>. <br></td></tr> 38<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> 39<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#e0">SetCondenseWhiteSpace</a> (bool condense)</td></tr> 40 41<tr><td class="mdescLeft"> </td><td class="mdescRight">The world does not agree on whether white space should be kept or not. <a href="#e0"></a><br></td></tr> 42<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e1"></a><!-- doxytag: member="TiXmlBase::IsWhiteSpaceCondensed" ref="e1" args="()" --> 43static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#e1">IsWhiteSpaceCondensed</a> ()</td></tr> 44 45<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the current white space setting. <br></td></tr> 46<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 47<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p1"></a><!-- doxytag: member="TiXmlBase::userData" ref="p1" args="" --> 48void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#p1">userData</a></td></tr> 49 50<tr><td class="mdescLeft"> </td><td class="mdescRight">Field containing a generic user pointer. <br></td></tr> 51<tr><td colspan="2"><br><h2>Friends</h2></td></tr> 52<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0"></a><!-- doxytag: member="TiXmlBase::TiXmlNode" ref="n0" args="" --> 53class </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#n0">TiXmlNode</a></td></tr> 54 55<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n1"></a><!-- doxytag: member="TiXmlBase::TiXmlElement" ref="n1" args="" --> 56class </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#n1">TiXmlElement</a></td></tr> 57 58<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n2"></a><!-- doxytag: member="TiXmlBase::TiXmlDocument" ref="n2" args="" --> 59class </td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#n2">TiXmlDocument</a></td></tr> 60 61</table> 62<hr><a name="_details"></a><h2>Detailed Description</h2> 63TiXmlBase is a base class for every class in TinyXml. 64<p> 65It does little except to establish that TinyXml classes can be printed and provide some utility functions.<p> 66In XML, the document and elements can contain other elements and other types of nodes.<p> 67<div class="fragment"><pre class="fragment"> A Document can contain: Element (container or leaf) 68 Comment (leaf) 69 Unknown (leaf) 70 Declaration( leaf ) 71 72 An Element can contain: Element (container or leaf) 73 Text (leaf) 74 Attributes (not on tree) 75 Comment (leaf) 76 Unknown (leaf) 77 78 A Decleration contains: Attributes (not on tree) 79 </pre></div> 80<p> 81<hr><h2>Member Function Documentation</h2> 82<a class="anchor" name="a2"></a><!-- doxytag: member="TiXmlBase::Print" ref="a2" args="(FILE *cfile, int depth) const =0" --><p> 83<table class="mdTable" cellpadding="2" cellspacing="0"> 84 <tr> 85 <td class="mdRow"> 86 <table cellpadding="0" cellspacing="0" border="0"> 87 <tr> 88 <td class="md" nowrap valign="top">virtual void TiXmlBase::Print </td> 89 <td class="md" valign="top">( </td> 90 <td class="md" nowrap valign="top">FILE * </td> 91 <td class="mdname" nowrap> <em>cfile</em>, </td> 92 </tr> 93 <tr> 94 <td class="md" nowrap align="right"></td> 95 <td class="md"></td> 96 <td class="md" nowrap>int </td> 97 <td class="mdname" nowrap> <em>depth</em></td> 98 </tr> 99 <tr> 100 <td class="md"></td> 101 <td class="md">) </td> 102 <td class="md" colspan="2"> const<code> [pure virtual]</code></td> 103 </tr> 104 </table> 105 </td> 106 </tr> 107</table> 108<table cellspacing="5" cellpadding="0" border="0"> 109 <tr> 110 <td> 111 112 </td> 113 <td> 114 115<p> 116All TinyXml classes can print themselves to a filestream. 117<p> 118This is a formatted print, and will insert tabs and newlines.<p> 119(For an unformatted stream, use the << operator.) 120<p> 121Implemented in <a class="el" href="classTiXmlAttribute.html#a23">TiXmlAttribute</a>, <a class="el" href="classTiXmlElement.html#a29">TiXmlElement</a>, <a class="el" href="classTiXmlComment.html#a5">TiXmlComment</a>, <a class="el" href="classTiXmlText.html#a5">TiXmlText</a>, <a class="el" href="classTiXmlDeclaration.html#a10">TiXmlDeclaration</a>, <a class="el" href="classTiXmlUnknown.html#a5">TiXmlUnknown</a>, and <a class="el" href="classTiXmlDocument.html#a24">TiXmlDocument</a>. </td> 122 </tr> 123</table> 124<a class="anchor" name="a3"></a><!-- doxytag: member="TiXmlBase::Row" ref="a3" args="() const " --><p> 125<table class="mdTable" cellpadding="2" cellspacing="0"> 126 <tr> 127 <td class="mdRow"> 128 <table cellpadding="0" cellspacing="0" border="0"> 129 <tr> 130 <td class="md" nowrap valign="top">int TiXmlBase::Row </td> 131 <td class="md" valign="top">( </td> 132 <td class="mdname1" valign="top" nowrap> </td> 133 <td class="md" valign="top"> ) </td> 134 <td class="md" nowrap> const<code> [inline]</code></td> 135 </tr> 136 </table> 137 </td> 138 </tr> 139</table> 140<table cellspacing="5" cellpadding="0" border="0"> 141 <tr> 142 <td> 143 144 </td> 145 <td> 146 147<p> 148Return the position, in the original source file, of this node or attribute. 149<p> 150The row and column are 1-based. (That is the first row and first column is 1,1). If the returns values are 0 or less, then the parser does not have a row and column value.<p> 151Generally, the row and column value will be set when the TiXmlDocument::Load(), <a class="el" href="classTiXmlDocument.html#a6">TiXmlDocument::LoadFile()</a>, or any TiXmlNode::Parse() is called. It will NOT be set when the DOM was created from operator>>.<p> 152The values reflect the initial load. Once the DOM is modified programmatically (by adding or changing nodes and attributes) the new values will NOT update to reflect changes in the document.<p> 153There is a minor performance cost to computing the row and column. Computation can be disabled if <a class="el" href="classTiXmlDocument.html#a20">TiXmlDocument::SetTabSize()</a> is called with 0 as the value.<p> 154<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlDocument.html#a20">TiXmlDocument::SetTabSize()</a></dd></dl> 155 </td> 156 </tr> 157</table> 158<a class="anchor" name="e0"></a><!-- doxytag: member="TiXmlBase::SetCondenseWhiteSpace" ref="e0" args="(bool condense)" --><p> 159<table class="mdTable" cellpadding="2" cellspacing="0"> 160 <tr> 161 <td class="mdRow"> 162 <table cellpadding="0" cellspacing="0" border="0"> 163 <tr> 164 <td class="md" nowrap valign="top">static void TiXmlBase::SetCondenseWhiteSpace </td> 165 <td class="md" valign="top">( </td> 166 <td class="md" nowrap valign="top">bool </td> 167 <td class="mdname1" valign="top" nowrap> <em>condense</em> </td> 168 <td class="md" valign="top"> ) </td> 169 <td class="md" nowrap><code> [inline, static]</code></td> 170 </tr> 171 </table> 172 </td> 173 </tr> 174</table> 175<table cellspacing="5" cellpadding="0" border="0"> 176 <tr> 177 <td> 178 179 </td> 180 <td> 181 182<p> 183The world does not agree on whether white space should be kept or not. 184<p> 185In order to make everyone happy, these global, static functions are provided to set whether or not TinyXml will condense all white space into a single space or not. The default is to condense. Note changing this values is not thread safe. </td> 186 </tr> 187</table> 188<hr>The documentation for this class was generated from the following file:<ul> 189<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul> 190<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 14:15:30 2005 for TinyXml by 191<a href="http://www.doxygen.org/index.html"> 192<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> 193</body> 194</html> 195