\section{Ti\-Xml\-Attribute Class Reference}
\label{classTiXmlAttribute}\index{Ti\-Xml\-Attribute@{Ti\-Xml\-Attribute}}


An attribute is a name-\/value pair.  




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

Inheritance diagram for Ti\-Xml\-Attribute\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classTiXmlAttribute}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Ti\-Xml\-Attribute} ()\label{classTiXmlAttribute_a9cfa3c8179873fd485d83003b114f8e1}

\begin{DoxyCompactList}\small\item\em Construct an empty attribute. \end{DoxyCompactList}\item 
{\bf Ti\-Xml\-Attribute} (const std\-::string \&\-\_\-name, const std\-::string \&\-\_\-value)\label{classTiXmlAttribute_a052213522caac3979960e0714063861d}

\begin{DoxyCompactList}\small\item\em std\-::string constructor. \end{DoxyCompactList}\item 
{\bf Ti\-Xml\-Attribute} (const char $\ast$\-\_\-name, const char $\ast$\-\_\-value)\label{classTiXmlAttribute_a759d0b76fb8fcf765ecab243bc14f05e}

\begin{DoxyCompactList}\small\item\em Construct an attribute with a name and value. \end{DoxyCompactList}\item 
const char $\ast$ {\bf Name} () const \label{classTiXmlAttribute_a298a57287d305904ba6bd96ae6f78d3d}

\begin{DoxyCompactList}\small\item\em Return the name of this attribute. \end{DoxyCompactList}\item 
const char $\ast$ {\bf Value} () const \label{classTiXmlAttribute_a0f874490eac8ca00ee0070765d0e97e3}

\begin{DoxyCompactList}\small\item\em Return the value of this attribute. \end{DoxyCompactList}\item 
const std\-::string \& {\bf Value\-Str} () const \label{classTiXmlAttribute_a87705c3ccf9ee9417beb4f7cbacd4d33}

\begin{DoxyCompactList}\small\item\em Return the value of this attribute. \end{DoxyCompactList}\item 
int {\bf Int\-Value} () const \label{classTiXmlAttribute_aa1a20ad59dc7e89a0ab265396360d50f}

\begin{DoxyCompactList}\small\item\em Return the value of this attribute, converted to an integer. \end{DoxyCompactList}\item 
double {\bf Double\-Value} () const \label{classTiXmlAttribute_a2880ddef53fc7522c99535273954d230}

\begin{DoxyCompactList}\small\item\em Return the value of this attribute, converted to a double. \end{DoxyCompactList}\item 
const T\-I\-X\-M\-L\-\_\-\-S\-T\-R\-I\-N\-G \& {\bfseries Name\-T\-Str} () const \label{classTiXmlAttribute_a64cee17bceb8232eb0736d26dd082d79}

\item 
int {\bf Query\-Int\-Value} (int $\ast$\-\_\-value) const 
\begin{DoxyCompactList}\small\item\em Query\-Int\-Value examines the value string. \end{DoxyCompactList}\item 
int {\bf Query\-Double\-Value} (double $\ast$\-\_\-value) const \label{classTiXmlAttribute_ac87b2a8489906a5d7aa2875f20be3513}

\begin{DoxyCompactList}\small\item\em Query\-Double\-Value examines the value string. See \doxyref{Query\-Int\-Value()}{p.}{classTiXmlAttribute_ad6c93088ee21af41a107931223339344}. \end{DoxyCompactList}\item 
void {\bf Set\-Name} (const char $\ast$\-\_\-name)\label{classTiXmlAttribute_ab7fa3d21ff8d7c5764cf9af15b667a99}

\begin{DoxyCompactList}\small\item\em Set the name of this attribute. \end{DoxyCompactList}\item 
void {\bf Set\-Value} (const char $\ast$\-\_\-value)\label{classTiXmlAttribute_a2dae44178f668b3cb48101be4f2236a0}

\begin{DoxyCompactList}\small\item\em Set the value. \end{DoxyCompactList}\item 
void {\bf Set\-Int\-Value} (int \-\_\-value)\label{classTiXmlAttribute_a7e065df640116a62ea4f4b7da5449cc8}

\begin{DoxyCompactList}\small\item\em Set the value from an integer. \end{DoxyCompactList}\item 
void {\bf Set\-Double\-Value} (double \-\_\-value)\label{classTiXmlAttribute_a0316da31373496c4368ad549bf711394}

\begin{DoxyCompactList}\small\item\em Set the value from a double. \end{DoxyCompactList}\item 
void {\bf Set\-Name} (const std\-::string \&\-\_\-name)\label{classTiXmlAttribute_ab296ff0c9a8c701055cd257a8a976e57}

\begin{DoxyCompactList}\small\item\em S\-T\-L std\-::string form. \end{DoxyCompactList}\item 
void {\bf Set\-Value} (const std\-::string \&\-\_\-value)\label{classTiXmlAttribute_ab43f67a0cc3ec1d80e62606500f0925f}

\begin{DoxyCompactList}\small\item\em S\-T\-L std\-::string form. \end{DoxyCompactList}\item 
const {\bf Ti\-Xml\-Attribute} $\ast$ {\bf Next} () const \label{classTiXmlAttribute_a776478980776a024f7c2846eec640f65}

\begin{DoxyCompactList}\small\item\em Get the next sibling attribute in the D\-O\-M. Returns null at end. \end{DoxyCompactList}\item 
{\bf Ti\-Xml\-Attribute} $\ast$ {\bfseries Next} ()\label{classTiXmlAttribute_a138320aa7793b148ba7e5bd0a0ea4db6}

\item 
const {\bf Ti\-Xml\-Attribute} $\ast$ {\bf Previous} () const \label{classTiXmlAttribute_a54a5f8730c7b02b9a41b74e12e27fe86}

\begin{DoxyCompactList}\small\item\em Get the previous sibling attribute in the D\-O\-M. Returns null at beginning. \end{DoxyCompactList}\item 
{\bf Ti\-Xml\-Attribute} $\ast$ {\bfseries Previous} ()\label{classTiXmlAttribute_ae4dabc932cba945ed1e92fec5f121193}

\item 
bool {\bfseries operator==} (const {\bf Ti\-Xml\-Attribute} \&rhs) const \label{classTiXmlAttribute_ae48c2a65b520d453914ce4e845d607cf}

\item 
bool {\bfseries operator$<$} (const {\bf Ti\-Xml\-Attribute} \&rhs) const \label{classTiXmlAttribute_adb8b6f2cad5948e73e383182e7ce10de}

\item 
bool {\bfseries operator$>$} (const {\bf Ti\-Xml\-Attribute} \&rhs) const \label{classTiXmlAttribute_a867562769ef9778c1690cd373246b05b}

\item 
virtual const char $\ast$ {\bfseries Parse} (const char $\ast$p, {\bf Ti\-Xml\-Parsing\-Data} $\ast$data, Ti\-Xml\-Encoding encoding)\label{classTiXmlAttribute_ad62774421b814894b995af3b5d231dda}

\item 
virtual void {\bf Print} (F\-I\-L\-E $\ast$cfile, int depth) const 
\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 
void {\bfseries Print} (F\-I\-L\-E $\ast$cfile, int depth, T\-I\-X\-M\-L\-\_\-\-S\-T\-R\-I\-N\-G $\ast$str) const \label{classTiXmlAttribute_a19e6b6862a80b188571c47947e88d030}

\item 
void {\bfseries Set\-Document} ({\bf Ti\-Xml\-Document} $\ast$doc)\label{classTiXmlAttribute_ac12a94d4548302afb12f488ba101f7d1}

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
class {\bfseries Ti\-Xml\-Attribute\-Set}\label{classTiXmlAttribute_a35a7b7f89f708527677d5078d41ce0bf}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
An attribute is a name-\/value pair. 

Elements have an arbitrary number of attributes, each with a unique name.

\begin{DoxyNote}{Note}
The attributes are not Ti\-Xml\-Nodes, since they are not part of the tiny\-X\-M\-L document object model. There are other suggested ways to look at this problem. 
\end{DoxyNote}


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


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.) 

Implements {\bf Ti\-Xml\-Base} \doxyref{}{p.}{classTiXmlBase_a0de56b3f2ef14c65091a3b916437b512}.



Referenced by Ti\-Xml\-Printer\-::\-Visit\-Enter().

\index{Ti\-Xml\-Attribute@{Ti\-Xml\-Attribute}!Query\-Int\-Value@{Query\-Int\-Value}}
\index{Query\-Int\-Value@{Query\-Int\-Value}!TiXmlAttribute@{Ti\-Xml\-Attribute}}
\subsubsection[{Query\-Int\-Value}]{\setlength{\rightskip}{0pt plus 5cm}int Ti\-Xml\-Attribute\-::\-Query\-Int\-Value (
\begin{DoxyParamCaption}
\item[{int $\ast$}]{\-\_\-value}
\end{DoxyParamCaption}
) const}\label{classTiXmlAttribute_ad6c93088ee21af41a107931223339344}


Query\-Int\-Value examines the value string. 

It is an alternative to the \doxyref{Int\-Value()}{p.}{classTiXmlAttribute_aa1a20ad59dc7e89a0ab265396360d50f} method with richer error checking. If the value is an integer, it is stored in 'value' and the call returns T\-I\-X\-M\-L\-\_\-\-S\-U\-C\-C\-E\-S\-S. If it is not an integer, it returns T\-I\-X\-M\-L\-\_\-\-W\-R\-O\-N\-G\-\_\-\-T\-Y\-P\-E.

A specialized but useful call. Note that for success it returns 0, which is the opposite of almost all other Tiny\-Xml calls. 

Referenced by Ti\-Xml\-Element\-::\-Query\-Int\-Attribute().



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