\section{gear\-:\-:Ti\-Xml\-Attribute Class Reference}
\label{classgear_1_1TiXmlAttribute}\index{gear\-::\-Ti\-Xml\-Attribute@{gear\-::\-Ti\-Xml\-Attribute}}


An attribute is a name-\/value pair.  




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

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

\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{classgear_1_1TiXmlAttribute_aa4fb0ca4a03caf764b855f258525209d}

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

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

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

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

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

\begin{DoxyCompactList}\small\item\em Return the value of this attribute, converted to a double. \end{DoxyCompactList}\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{classgear_1_1TiXmlAttribute_a6ff8585f1ae8e364039e147890e9f250}

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

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

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

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

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

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

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

\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{classgear_1_1TiXmlAttribute_a9f38a0038a361321eed8911a4aa1f2bf}

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

\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{classgear_1_1TiXmlAttribute_a47557ec7466725d71fa0a83c4feeb6af}

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

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

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

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

\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. \end{DoxyCompactList}\item 
virtual void {\bfseries Stream\-Out} (T\-I\-X\-M\-L\-\_\-\-O\-S\-T\-R\-E\-A\-M $\ast$out) const \label{classgear_1_1TiXmlAttribute_ae7335734471b0ebb446a5d76757c6a15}

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

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
class {\bfseries Ti\-Xml\-Attribute\-Set}\label{classgear_1_1TiXmlAttribute_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}


Definition at line 675 of file tinyxml.\-h.



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


All Tiny\-Xml classes can print themselves to a filestream. 

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

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

Implements {\bf gear\-::\-Ti\-Xml\-Base} \doxyref{}{p.}{classgear_1_1TiXmlBase_a3b248c5aa5996517ce3a1a8e5acd8b50}.



Definition at line 1102 of file tinyxml.\-cc.

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


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

It is an alternative to the \doxyref{Int\-Value()}{p.}{classgear_1_1TiXmlAttribute_aa222cf1da5c7a16beef93974b9f58dfd} 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. 

Definition at line 1134 of file tinyxml.\-cc.



Referenced by gear\-::\-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}
