\section{Ti\-Xml\-Base Class Reference}
\label{classTiXmlBase}\index{Ti\-Xml\-Base@{Ti\-Xml\-Base}}


\doxyref{Ti\-Xml\-Base}{p.}{classTiXmlBase} is a base class for every class in Tiny\-Xml.  




{\ttfamily \#include $<$tinyxml.\-h$>$}

Inheritance diagram for Ti\-Xml\-Base\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.413793cm]{classTiXmlBase}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \{ \\*
{\bfseries T\-I\-X\-M\-L\-\_\-\-N\-O\-\_\-\-E\-R\-R\-O\-R} = 0, 
{\bfseries T\-I\-X\-M\-L\-\_\-\-E\-R\-R\-O\-R}, 
{\bfseries T\-I\-X\-M\-L\-\_\-\-E\-R\-R\-O\-R\-\_\-\-O\-P\-E\-N\-I\-N\-G\-\_\-\-F\-I\-L\-E}, 
{\bfseries T\-I\-X\-M\-L\-\_\-\-E\-R\-R\-O\-R\-\_\-\-O\-U\-T\-\_\-\-O\-F\-\_\-\-M\-E\-M\-O\-R\-Y}, 
\\*
{\bfseries T\-I\-X\-M\-L\-\_\-\-E\-R\-R\-O\-R\-\_\-\-P\-A\-R\-S\-I\-N\-G\-\_\-\-E\-L\-E\-M\-E\-N\-T}, 
{\bfseries T\-I\-X\-M\-L\-\_\-\-E\-R\-R\-O\-R\-\_\-\-F\-A\-I\-L\-E\-D\-\_\-\-T\-O\-\_\-\-R\-E\-A\-D\-\_\-\-E\-L\-E\-M\-E\-N\-T\-\_\-\-N\-A\-M\-E}, 
{\bfseries T\-I\-X\-M\-L\-\_\-\-E\-R\-R\-O\-R\-\_\-\-R\-E\-A\-D\-I\-N\-G\-\_\-\-E\-L\-E\-M\-E\-N\-T\-\_\-\-V\-A\-L\-U\-E}, 
{\bfseries T\-I\-X\-M\-L\-\_\-\-E\-R\-R\-O\-R\-\_\-\-R\-E\-A\-D\-I\-N\-G\-\_\-\-A\-T\-T\-R\-I\-B\-U\-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public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void {\bf Print} (F\-I\-L\-E $\ast$cfile, int depth) const =0
\begin{DoxyCompactList}\small\item\em All Tiny\-Xml classes can print themselves to a filestream or the string class (\doxyref{Ti\-Xml\-String}{p.}{classTiXmlString} in non-\/\-S\-T\-L mode, std\-::string in S\-T\-L mode.) Either or both cfile and str can be null. \end{DoxyCompactList}\item 
int {\bf Row} () const 
\begin{DoxyCompactList}\small\item\em Return the position, in the original source file, of this node or attribute. \end{DoxyCompactList}\item 
int {\bf Column} () const \label{classTiXmlBase_ab54bfb9b70fe6dd276e7b279cab7f003}

\begin{DoxyCompactList}\small\item\em See \doxyref{Row()}{p.}{classTiXmlBase_a024bceb070188df92c2a8d8852dd0853} \end{DoxyCompactList}\item 
void {\bf Set\-User\-Data} (void $\ast$user)\label{classTiXmlBase_ac6b3e0f790930d4970ec30764e937b5d}

\begin{DoxyCompactList}\small\item\em Set a pointer to arbitrary user data. \end{DoxyCompactList}\item 
void $\ast$ {\bf Get\-User\-Data} ()\label{classTiXmlBase_a6559a530ca6763fc301a14d77ed28c17}

\begin{DoxyCompactList}\small\item\em Get a pointer to arbitrary user data. \end{DoxyCompactList}\item 
const void $\ast$ {\bf Get\-User\-Data} () const \label{classTiXmlBase_ad0120210e4680ef2088601753ce0ede4}

\begin{DoxyCompactList}\small\item\em Get a pointer to arbitrary user data. \end{DoxyCompactList}\item 
virtual const char $\ast$ {\bfseries Parse} (const char $\ast$p, {\bf Ti\-Xml\-Parsing\-Data} $\ast$data, Ti\-Xml\-Encoding encoding)=0\label{classTiXmlBase_a00e4edb0219d00a1379c856e5a1d2025}

\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static void {\bf Set\-Condense\-White\-Space} (bool condense)
\begin{DoxyCompactList}\small\item\em The world does not agree on whether white space should be kept or not. \end{DoxyCompactList}\item 
static bool {\bf Is\-White\-Space\-Condensed} ()\label{classTiXmlBase_ad4b1472531c647a25b1840a87ae42438}

\begin{DoxyCompactList}\small\item\em Return the current white space setting. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static const int {\bfseries utf8\-Byte\-Table} [256]
\end{DoxyCompactItemize}
\subsection*{Static Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
static const char $\ast$ {\bfseries Skip\-White\-Space} (const char $\ast$, Ti\-Xml\-Encoding encoding)\label{classTiXmlBase_ac0c3d66d8a9e6996a1fa016275e16875}

\item 
static bool {\bfseries Is\-White\-Space} (char c)\label{classTiXmlBase_af56296d561c0bab4bc8e198cdcf5c48e}

\item 
static bool {\bfseries Is\-White\-Space} (int c)\label{classTiXmlBase_a3de391ea9f4c4a8aa10d04480b048795}

\item 
static bool {\bfseries Stream\-White\-Space} (std\-::istream $\ast$in, T\-I\-X\-M\-L\-\_\-\-S\-T\-R\-I\-N\-G $\ast$tag)\label{classTiXmlBase_aafe51421ca2f618d250a0541e8d61a4e}

\item 
static bool {\bfseries Stream\-To} (std\-::istream $\ast$in, int character, T\-I\-X\-M\-L\-\_\-\-S\-T\-R\-I\-N\-G $\ast$tag)\label{classTiXmlBase_aac761023c11f3216de865f0a4b2b137b}

\item 
static const char $\ast$ {\bfseries Read\-Name} (const char $\ast$p, T\-I\-X\-M\-L\-\_\-\-S\-T\-R\-I\-N\-G $\ast$name, Ti\-Xml\-Encoding encoding)\label{classTiXmlBase_a1c21a6ab5f7b503acd91f35f183734b3}

\item 
static const char $\ast$ {\bfseries Read\-Text} (const char $\ast$in, T\-I\-X\-M\-L\-\_\-\-S\-T\-R\-I\-N\-G $\ast$text, bool ignore\-White\-Space, const char $\ast$end\-Tag, bool ignore\-Case, Ti\-Xml\-Encoding encoding)\label{classTiXmlBase_aa646c74921aa33156968b802bbf5566e}

\item 
static const char $\ast$ {\bfseries Get\-Entity} (const char $\ast$in, char $\ast$value, int $\ast$length, Ti\-Xml\-Encoding encoding)\label{classTiXmlBase_ac5c08bf3deffcda0bf8ce2958372b584}

\item 
static const char $\ast$ {\bfseries Get\-Char} (const char $\ast$p, char $\ast$\-\_\-value, int $\ast$length, Ti\-Xml\-Encoding encoding)\label{classTiXmlBase_a5b0fde72d6f662ae1fd6303195d2159b}

\item 
static void {\bfseries Put\-String} (const T\-I\-X\-M\-L\-\_\-\-S\-T\-R\-I\-N\-G \&str, T\-I\-X\-M\-L\-\_\-\-S\-T\-R\-I\-N\-G $\ast$out)\label{classTiXmlBase_a283ddc4f1f53a53e7111eff4e12a63d9}

\item 
static bool {\bfseries String\-Equal} (const char $\ast$p, const char $\ast$end\-Tag, bool ignore\-Case, Ti\-Xml\-Encoding encoding)\label{classTiXmlBase_a51631e6986179558b9e5850723ed165a}

\item 
static int {\bfseries Is\-Alpha} (unsigned char any\-Byte, Ti\-Xml\-Encoding encoding)\label{classTiXmlBase_ae22522b2e8e1ac43102d16394f639fc8}

\item 
static int {\bfseries Is\-Alpha\-Num} (unsigned char any\-Byte, Ti\-Xml\-Encoding encoding)\label{classTiXmlBase_a321919055c115c78ded17f85a793f368}

\item 
static int {\bfseries To\-Lower} (int v, Ti\-Xml\-Encoding encoding)\label{classTiXmlBase_a799f17405a86a5c2029618e85f11a097}

\item 
static void {\bfseries Convert\-U\-T\-F32\-To\-U\-T\-F8} (unsigned long input, char $\ast$output, int $\ast$length)\label{classTiXmlBase_a07c765e3a7f979d343e646ea797b180b}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
{\bf Ti\-Xml\-Cursor} {\bfseries location}\label{classTiXmlBase_a0d992580f3bc264909f898e942677a3c}

\item 
void $\ast$ {\bf user\-Data}\label{classTiXmlBase_ab242c01590191f644569fa89a080d97c}

\begin{DoxyCompactList}\small\item\em Field containing a generic user pointer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Protected Attributes}
\begin{DoxyCompactItemize}
\item 
static const char $\ast$ {\bfseries error\-String} [T\-I\-X\-M\-L\-\_\-\-E\-R\-R\-O\-R\-\_\-\-S\-T\-R\-I\-N\-G\-\_\-\-C\-O\-U\-N\-T]
\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
class {\bfseries Ti\-Xml\-Node}\label{classTiXmlBase_a218872a0d985ae30e78c55adc4bdb196}

\item 
class {\bfseries Ti\-Xml\-Element}\label{classTiXmlBase_ab6592e32cb9132be517cc12a70564c4b}

\item 
class {\bfseries Ti\-Xml\-Document}\label{classTiXmlBase_a173617f6dfe902cf484ce5552b950475}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\doxyref{Ti\-Xml\-Base}{p.}{classTiXmlBase} is a base class for every class in Tiny\-Xml. 

It does little except to establish that Tiny\-Xml classes can be printed and provide some utility functions.

In X\-M\-L, the document and elements can contain other elements and other types of nodes.

\begin{DoxyVerb}    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)\end{DoxyVerb}
 

\subsection{Member Function Documentation}
\index{Ti\-Xml\-Base@{Ti\-Xml\-Base}!Print@{Print}}
\index{Print@{Print}!TiXmlBase@{Ti\-Xml\-Base}}
\subsubsection[{Print}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Ti\-Xml\-Base\-::\-Print (
\begin{DoxyParamCaption}
\item[{F\-I\-L\-E $\ast$}]{cfile, }
\item[{int}]{depth}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [pure virtual]}}\label{classTiXmlBase_a0de56b3f2ef14c65091a3b916437b512}


All Tiny\-Xml classes can print themselves to a filestream or the string class (\doxyref{Ti\-Xml\-String}{p.}{classTiXmlString} in non-\/\-S\-T\-L mode, std\-::string in S\-T\-L mode.) Either or both cfile and str can be null. 

This is a formatted print, and will insert tabs and newlines.

(For an unformatted stream, use the $<$$<$ operator.) 

Implemented in {\bf Ti\-Xml\-Document} \doxyref{}{p.}{classTiXmlDocument_a7b1aea204fee266b70b9c105c8bf2ada}, {\bf Ti\-Xml\-Unknown} \doxyref{}{p.}{classTiXmlUnknown_a025f19c21ef01ea9be50febb8fe0ba06}, {\bf Ti\-Xml\-Declaration} \doxyref{}{p.}{classTiXmlDeclaration_abf6303db4bd05b5be554036817ff1cb4}, {\bf Ti\-Xml\-Text} \doxyref{}{p.}{classTiXmlText_ae74d56c5b3ddec6cc3103dd51821af92}, {\bf Ti\-Xml\-Comment} \doxyref{}{p.}{classTiXmlComment_a17398061d62c470f57801ce28fa33ad4}, {\bf Ti\-Xml\-Element} \doxyref{}{p.}{classTiXmlElement_ad9d0c008866982ab8d9aafae7e14d692}, and {\bf Ti\-Xml\-Attribute} \doxyref{}{p.}{classTiXmlAttribute_acc04956c1d5c4c31fe74f7a7528d109a}.



Referenced by Ti\-Xml\-Element\-::\-Print(), and Ti\-Xml\-Document\-::\-Print().

\index{Ti\-Xml\-Base@{Ti\-Xml\-Base}!Row@{Row}}
\index{Row@{Row}!TiXmlBase@{Ti\-Xml\-Base}}
\subsubsection[{Row}]{\setlength{\rightskip}{0pt plus 5cm}int Ti\-Xml\-Base\-::\-Row (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\label{classTiXmlBase_a024bceb070188df92c2a8d8852dd0853}


Return the position, in the original source file, of this node or attribute. 

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.

Generally, the row and column value will be set when the Ti\-Xml\-Document\-::\-Load(), \doxyref{Ti\-Xml\-Document\-::\-Load\-File()}{p.}{classTiXmlDocument_a4c852a889c02cf251117fd1d9fe1845f}, or any Ti\-Xml\-Node\-::\-Parse() is called. It will N\-O\-T be set when the D\-O\-M was created from operator$>$$>$.

The values reflect the initial load. Once the D\-O\-M is modified programmatically (by adding or changing nodes and attributes) the new values will N\-O\-T update to reflect changes in the document.

There is a minor performance cost to computing the row and column. Computation can be disabled if \doxyref{Ti\-Xml\-Document\-::\-Set\-Tab\-Size()}{p.}{classTiXmlDocument_a51dac56316f89b35bdb7d0d433ba988e} is called with 0 as the value.

\begin{DoxySeeAlso}{See Also}
\doxyref{Ti\-Xml\-Document\-::\-Set\-Tab\-Size()}{p.}{classTiXmlDocument_a51dac56316f89b35bdb7d0d433ba988e} 
\end{DoxySeeAlso}
\index{Ti\-Xml\-Base@{Ti\-Xml\-Base}!Set\-Condense\-White\-Space@{Set\-Condense\-White\-Space}}
\index{Set\-Condense\-White\-Space@{Set\-Condense\-White\-Space}!TiXmlBase@{Ti\-Xml\-Base}}
\subsubsection[{Set\-Condense\-White\-Space}]{\setlength{\rightskip}{0pt plus 5cm}static void Ti\-Xml\-Base\-::\-Set\-Condense\-White\-Space (
\begin{DoxyParamCaption}
\item[{bool}]{condense}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}\label{classTiXmlBase_a0f799ec645bfb8d8a969e83478f379c1}


The world does not agree on whether white space should be kept or not. 

In order to make everyone happy, these global, static functions are provided to set whether or not Tiny\-Xml will condense all white space into a single space or not. The default is to condense. Note changing this value is not thread safe. 

\subsection{Member Data Documentation}
\index{Ti\-Xml\-Base@{Ti\-Xml\-Base}!error\-String@{error\-String}}
\index{error\-String@{error\-String}!TiXmlBase@{Ti\-Xml\-Base}}
\subsubsection[{error\-String}]{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ Ti\-Xml\-Base\-::error\-String\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [protected]}}\label{classTiXmlBase_a7ac8feec4100e446b3d78e1ac0659700}
{\bfseries Initial value\-:}
\begin{DoxyCode}
=
\{
        \textcolor{stringliteral}{"No error"},
        \textcolor{stringliteral}{"Error"},
        \textcolor{stringliteral}{"Failed to open file"},
        \textcolor{stringliteral}{"Memory allocation failed."},
        \textcolor{stringliteral}{"Error parsing Element."},
        \textcolor{stringliteral}{"Failed to read Element name"},
        \textcolor{stringliteral}{"Error reading Element value."},
        \textcolor{stringliteral}{"Error reading Attributes."},
        \textcolor{stringliteral}{"Error: empty tag."},
        \textcolor{stringliteral}{"Error reading end tag."},
        \textcolor{stringliteral}{"Error parsing Unknown."},
        \textcolor{stringliteral}{"Error parsing Comment."},
        \textcolor{stringliteral}{"Error parsing Declaration."},
        \textcolor{stringliteral}{"Error document empty."},
        \textcolor{stringliteral}{"Error null (0) or unexpected EOF found in input stream."},
        \textcolor{stringliteral}{"Error parsing CDATA."},
        \textcolor{stringliteral}{"Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root."},
\}
\end{DoxyCode}
\index{Ti\-Xml\-Base@{Ti\-Xml\-Base}!utf8\-Byte\-Table@{utf8\-Byte\-Table}}
\index{utf8\-Byte\-Table@{utf8\-Byte\-Table}!TiXmlBase@{Ti\-Xml\-Base}}
\subsubsection[{utf8\-Byte\-Table}]{\setlength{\rightskip}{0pt plus 5cm}const int Ti\-Xml\-Base\-::utf8\-Byte\-Table\hspace{0.3cm}{\ttfamily [static]}}\label{classTiXmlBase_ac8c86058137bdb4b413c3eca58f2d467}
{\bfseries Initial value\-:}
\begin{DoxyCode}
= 
\{
        
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1,      
                1,      1,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      
      2,       2,      2,      2,      
                2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      2,      
      2,       2,      2,      2,      
                3,      3,      3,      3,      3,      3,      3,      3,      3,      3,      3,      3,      
      3,       3,      3,      3,      
                4,      4,      4,      4,      4,      1,      1,      1,      1,      1,      1,      1,      
      1,       1,      1,      1       
\}
\end{DoxyCode}


The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
tinyxml.\-h\item 
tinyxml.\-cc\item 
tinyxmlerror.\-cc\item 
tinyxmlparser.\-cc\end{DoxyCompactItemize}
