<!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: TiXmlBase 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>TiXmlBase Class Reference</h1><!-- doxytag: class="TiXmlBase" -->TiXmlBase is a base class for every class in TinyXml.  
<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 TiXmlBase:
<p><center><img src="classTiXmlBase.png" usemap="#TiXmlBase_map" border="0" alt=""></center>
<map name="TiXmlBase_map">
<area href="classTiXmlAttribute.html" alt="TiXmlAttribute" shape="rect" coords="0,56,108,80">
<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="295,56,403,80">
<area href="classTiXmlComment.html" alt="TiXmlComment" shape="rect" coords="0,112,108,136">
<area href="classTiXmlDeclaration.html" alt="TiXmlDeclaration" shape="rect" coords="118,112,226,136">
<area href="classTiXmlDocument.html" alt="TiXmlDocument" shape="rect" coords="236,112,344,136">
<area href="classTiXmlElement.html" alt="TiXmlElement" shape="rect" coords="354,112,462,136">
<area href="classTiXmlText.html" alt="TiXmlText" shape="rect" coords="472,112,580,136">
<area href="classTiXmlUnknown.html" alt="TiXmlUnknown" shape="rect" coords="590,112,698,136">
</map>
<a href="classTiXmlBase-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">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a2">Print</a> (FILE *cfile, int depth) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All TinyXml classes can print themselves to a filestream.  <a href="#a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a3">Row</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the position, in the original source file, of this node or attribute.  <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4"></a><!-- doxytag: member="TiXmlBase::Column" ref="a4" args="() const " -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#a4">Column</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">See <a class="el" href="classTiXmlBase.html#a3">Row()</a>. <br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#e0">SetCondenseWhiteSpace</a> (bool condense)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e1"></a><!-- doxytag: member="TiXmlBase::IsWhiteSpaceCondensed" ref="e1" args="()" -->
static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#e1">IsWhiteSpaceCondensed</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the current white space setting. <br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p1"></a><!-- doxytag: member="TiXmlBase::userData" ref="p1" args="" -->
void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#p1">userData</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Field containing a generic user pointer. <br></td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n0"></a><!-- doxytag: member="TiXmlBase::TiXmlNode" ref="n0" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#n0">TiXmlNode</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n1"></a><!-- doxytag: member="TiXmlBase::TiXmlElement" ref="n1" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#n1">TiXmlElement</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="n2"></a><!-- doxytag: member="TiXmlBase::TiXmlDocument" ref="n2" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#n2">TiXmlDocument</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
TiXmlBase is a base class for every class in TinyXml. 
<p>
It does little except to establish that TinyXml classes can be printed and provide some utility functions.<p>
In XML, the document and elements can contain other elements and other types of nodes.<p>
<div class="fragment"><pre class="fragment">	A Document can contain:	Element	(container or leaf)
							Comment (leaf)
							Unknown (leaf)
							Declaration( leaf )

	An Element can contain:	Element (container or leaf)
							Text	(leaf)
							Attributes (not on tree)
							Comment (leaf)
							Unknown (leaf)

	A Decleration contains: Attributes (not on tree)
	</pre></div>
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a2"></a><!-- doxytag: member="TiXmlBase::Print" ref="a2" args="(FILE *cfile, int depth) const =0" --><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 TiXmlBase::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> [pure 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>
Implemented 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>
  </tr>
</table>
<a class="anchor" name="a3"></a><!-- doxytag: member="TiXmlBase::Row" ref="a3" args="() 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 TiXmlBase::Row           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the position, in the original source file, of this node or attribute. 
<p>
The 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>
Generally, 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&gt;&gt;.<p>
The 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>
There 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>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlDocument.html#a20">TiXmlDocument::SetTabSize()</a></dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="e0"></a><!-- doxytag: member="TiXmlBase::SetCondenseWhiteSpace" ref="e0" args="(bool condense)" --><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">static void TiXmlBase::SetCondenseWhiteSpace           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">bool&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>condense</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The world does not agree on whether white space should be kept or not. 
<p>
In 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>
  </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>