\section{gear\-:\-:Ti\-Xml\-Element Class Reference}
\label{classgear_1_1TiXmlElement}\index{gear\-::\-Ti\-Xml\-Element@{gear\-::\-Ti\-Xml\-Element}}


The element is a container class.  




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

Inheritance diagram for gear\-:\-:Ti\-Xml\-Element\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classgear_1_1TiXmlElement}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Ti\-Xml\-Element} (const char $\ast$in\-\_\-value)\label{classgear_1_1TiXmlElement_a6a7d59febe9d62e642c45d8ea372ed2e}

\begin{DoxyCompactList}\small\item\em Construct an element. \end{DoxyCompactList}\item 
{\bf Ti\-Xml\-Element} (const std\-::string \&\-\_\-value)\label{classgear_1_1TiXmlElement_aed327a9a99198a27c9b6d2588aac5b69}

\begin{DoxyCompactList}\small\item\em std\-::string constructor. \end{DoxyCompactList}\item 
{\bfseries Ti\-Xml\-Element} (const {\bf Ti\-Xml\-Element} \&)\label{classgear_1_1TiXmlElement_a9b3478c13e3167a851fa6e27cbe31f2a}

\item 
void {\bfseries operator=} (const {\bf Ti\-Xml\-Element} \&base)\label{classgear_1_1TiXmlElement_ad4f644e17b2c0113d7fba1912d693424}

\item 
const char $\ast$ {\bf Attribute} (const char $\ast$name) const \label{classgear_1_1TiXmlElement_ac181406d23329515a3bc1f0c492e65ad}

\begin{DoxyCompactList}\small\item\em Given an attribute name, \doxyref{Attribute()}{p.}{classgear_1_1TiXmlElement_ac181406d23329515a3bc1f0c492e65ad} returns the value for the attribute of that name, or null if none exists. \end{DoxyCompactList}\item 
const char $\ast$ {\bf Attribute} (const char $\ast$name, int $\ast$i) const 
\begin{DoxyCompactList}\small\item\em Given an attribute name, \doxyref{Attribute()}{p.}{classgear_1_1TiXmlElement_ac181406d23329515a3bc1f0c492e65ad} returns the value for the attribute of that name, or null if none exists. \end{DoxyCompactList}\item 
const char $\ast$ {\bf Attribute} (const char $\ast$name, double $\ast$d) const 
\begin{DoxyCompactList}\small\item\em Given an attribute name, \doxyref{Attribute()}{p.}{classgear_1_1TiXmlElement_ac181406d23329515a3bc1f0c492e65ad} returns the value for the attribute of that name, or null if none exists. \end{DoxyCompactList}\item 
int {\bf Query\-Int\-Attribute} (const char $\ast$name, int $\ast$value) const 
\begin{DoxyCompactList}\small\item\em Query\-Int\-Attribute examines the attribute -\/ it is an alternative to the \doxyref{Attribute()}{p.}{classgear_1_1TiXmlElement_ac181406d23329515a3bc1f0c492e65ad} method with richer error checking. \end{DoxyCompactList}\item 
int {\bf Query\-Double\-Attribute} (const char $\ast$name, double $\ast$value) const \label{classgear_1_1TiXmlElement_a79ccbfceb94328dbb7367b36f3b9a29e}

\begin{DoxyCompactList}\small\item\em Query\-Double\-Attribute examines the attribute -\/ see \doxyref{Query\-Int\-Attribute()}{p.}{classgear_1_1TiXmlElement_ac901a317abad5197a8f0ba358d956bdb}. \end{DoxyCompactList}\item 
int {\bf Query\-Double\-Attribute} (const char $\ast$name, float $\ast$value) const \label{classgear_1_1TiXmlElement_a85de32e28e9b36a29c2d4240c4b96fa3}

\begin{DoxyCompactList}\small\item\em Query\-Float\-Attribute examines the attribute -\/ see \doxyref{Query\-Int\-Attribute()}{p.}{classgear_1_1TiXmlElement_ac901a317abad5197a8f0ba358d956bdb}. \end{DoxyCompactList}\item 
void {\bf Set\-Attribute} (const char $\ast$name, const char $\ast$value)
\begin{DoxyCompactList}\small\item\em Sets an attribute of name to a given value. \end{DoxyCompactList}\item 
const char $\ast$ {\bfseries Attribute} (const std\-::string \&name) const \label{classgear_1_1TiXmlElement_a0ad4063b2648c96e57db9cbd3d7ae674}

\item 
const char $\ast$ {\bfseries Attribute} (const std\-::string \&name, int $\ast$i) const \label{classgear_1_1TiXmlElement_add396a5b65d6a5d68686c53bfb87e2e7}

\item 
const char $\ast$ {\bfseries Attribute} (const std\-::string \&name, double $\ast$d) const \label{classgear_1_1TiXmlElement_a5b8d2199c85e3ea88d8e23e8e651e4c2}

\item 
int {\bfseries Query\-Int\-Attribute} (const std\-::string \&name, int $\ast$value) const \label{classgear_1_1TiXmlElement_a7d481f70ba27f9d2ce5a80d6ffb8f116}

\item 
int {\bfseries Query\-Double\-Attribute} (const std\-::string \&name, double $\ast$value) const \label{classgear_1_1TiXmlElement_a02ab9ae4b4acc51f37a761b61dcfbf79}

\item 
void {\bf Set\-Attribute} (const std\-::string \&name, const std\-::string \&\-\_\-value)
\begin{DoxyCompactList}\small\item\em S\-T\-L std\-::string form. \end{DoxyCompactList}\item 
void {\bfseries Set\-Attribute} (const std\-::string \&name, int \-\_\-value)\label{classgear_1_1TiXmlElement_a45a22594c23089851e0d0ea822b0cde0}

\item 
void {\bf Set\-Attribute} (const char $\ast$name, int value)
\begin{DoxyCompactList}\small\item\em Sets an attribute of name to a given value. \end{DoxyCompactList}\item 
void {\bf Set\-Double\-Attribute} (const char $\ast$name, double value)
\begin{DoxyCompactList}\small\item\em Sets an attribute of name to a given value. \end{DoxyCompactList}\item 
void {\bf Remove\-Attribute} (const char $\ast$name)\label{classgear_1_1TiXmlElement_aed99e945396792ae314c6f40683a12f2}

\begin{DoxyCompactList}\small\item\em Deletes an attribute with the given name. \end{DoxyCompactList}\item 
void {\bf Remove\-Attribute} (const std\-::string \&name)\label{classgear_1_1TiXmlElement_ab9de8c00d706b36fea222b5fb58d258c}

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

\begin{DoxyCompactList}\small\item\em Access the first attribute in this element. \end{DoxyCompactList}\item 
{\bf Ti\-Xml\-Attribute} $\ast$ {\bfseries First\-Attribute} ()\label{classgear_1_1TiXmlElement_ab656e45c1d575a73f725a75fffd131d8}

\item 
const {\bf Ti\-Xml\-Attribute} $\ast$ {\bf Last\-Attribute} () const \label{classgear_1_1TiXmlElement_ab58d608ab2e2479c96f2147c579a5f81}

\begin{DoxyCompactList}\small\item\em Access the last attribute in this element. \end{DoxyCompactList}\item 
{\bf Ti\-Xml\-Attribute} $\ast$ {\bfseries Last\-Attribute} ()\label{classgear_1_1TiXmlElement_afe9f3032e338a584fd0c712e1acf721e}

\item 
virtual {\bf Ti\-Xml\-Node} $\ast$ {\bf Clone} () const \label{classgear_1_1TiXmlElement_aff7157d5218d4c6ab455ac7a9fc065ee}

\begin{DoxyCompactList}\small\item\em Creates a new Element and returns it -\/ the returned element is a copy. \end{DoxyCompactList}\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 const char $\ast$ {\bfseries Parse} (const char $\ast$p, {\bf Ti\-Xml\-Parsing\-Data} $\ast$data, Ti\-Xml\-Encoding encoding)\label{classgear_1_1TiXmlElement_ab00a4d31291de401aa4e9de4e840afe2}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void {\bfseries Copy\-To} ({\bf Ti\-Xml\-Element} $\ast$target) const \label{classgear_1_1TiXmlElement_a8d5e997fb29a841fb2bc2c8c7a866841}

\item 
void {\bfseries Clear\-This} ()\label{classgear_1_1TiXmlElement_a02f75b145b8013e9cd4b01cb23656fb7}

\item 
virtual void {\bfseries Stream\-In} (T\-I\-X\-M\-L\-\_\-\-I\-S\-T\-R\-E\-A\-M $\ast$in, T\-I\-X\-M\-L\-\_\-\-S\-T\-R\-I\-N\-G $\ast$tag)\label{classgear_1_1TiXmlElement_ab80a31e7a66321aae6867393af7b4bab}

\item 
virtual void {\bfseries Stream\-Out} (T\-I\-X\-M\-L\-\_\-\-O\-S\-T\-R\-E\-A\-M $\ast$out) const \label{classgear_1_1TiXmlElement_a39d596f685101a0cae0d0afa5559ea73}

\item 
const char $\ast$ {\bfseries Read\-Value} (const char $\ast$in, {\bf Ti\-Xml\-Parsing\-Data} $\ast$prev\-Data, Ti\-Xml\-Encoding encoding)\label{classgear_1_1TiXmlElement_a1a4b3afb7f9e22f34c36292d50f1b194}

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


\subsection{Detailed Description}
The element is a container class. 

It has a value, the element name, and can contain other elements, text, comments, and unknowns. Elements also contain an arbitrary number of attributes. 

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



\subsection{Member Function Documentation}
\index{gear\-::\-Ti\-Xml\-Element@{gear\-::\-Ti\-Xml\-Element}!Attribute@{Attribute}}
\index{Attribute@{Attribute}!gear::TiXmlElement@{gear\-::\-Ti\-Xml\-Element}}
\subsubsection[{Attribute}]{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ gear\-::\-Ti\-Xml\-Element\-::\-Attribute (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name, }
\item[{int $\ast$}]{i}
\end{DoxyParamCaption}
) const}\label{classgear_1_1TiXmlElement_a5c5602bd279120b8411512123a14f92f}


Given an attribute name, \doxyref{Attribute()}{p.}{classgear_1_1TiXmlElement_ac181406d23329515a3bc1f0c492e65ad} returns the value for the attribute of that name, or null if none exists. 

If the attribute exists and can be converted to an integer, the integer value will be put in the return 'i', if 'i' is non-\/null. 

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



References Attribute().

\index{gear\-::\-Ti\-Xml\-Element@{gear\-::\-Ti\-Xml\-Element}!Attribute@{Attribute}}
\index{Attribute@{Attribute}!gear::TiXmlElement@{gear\-::\-Ti\-Xml\-Element}}
\subsubsection[{Attribute}]{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ gear\-::\-Ti\-Xml\-Element\-::\-Attribute (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name, }
\item[{double $\ast$}]{d}
\end{DoxyParamCaption}
) const}\label{classgear_1_1TiXmlElement_a2d38ebc4f3a859bd386f928dce7fb3c1}


Given an attribute name, \doxyref{Attribute()}{p.}{classgear_1_1TiXmlElement_ac181406d23329515a3bc1f0c492e65ad} returns the value for the attribute of that name, or null if none exists. 

If the attribute exists and can be converted to an double, the double value will be put in the return 'd', if 'd' is non-\/null. 

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



References Attribute().

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


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 766 of file tinyxml.\-cc.



References gear\-::\-Ti\-Xml\-Attribute\-::\-Next(), gear\-::\-Ti\-Xml\-Node\-::\-Next\-Sibling(), gear\-::\-Ti\-Xml\-Base\-::\-Print(), and gear\-::\-Ti\-Xml\-Node\-::\-To\-Text().

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


Query\-Int\-Attribute examines the attribute -\/ it is an alternative to the \doxyref{Attribute()}{p.}{classgear_1_1TiXmlElement_ac181406d23329515a3bc1f0c492e65ad} method with richer error checking. 

If the attribute 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. If the attribute does not exist, then T\-I\-X\-M\-L\-\_\-\-N\-O\-\_\-\-A\-T\-T\-R\-I\-B\-U\-T\-E is returned. 

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



References gear\-::\-Ti\-Xml\-Attribute\-::\-Query\-Int\-Value().

\index{gear\-::\-Ti\-Xml\-Element@{gear\-::\-Ti\-Xml\-Element}!Set\-Attribute@{Set\-Attribute}}
\index{Set\-Attribute@{Set\-Attribute}!gear::TiXmlElement@{gear\-::\-Ti\-Xml\-Element}}
\subsubsection[{Set\-Attribute}]{\setlength{\rightskip}{0pt plus 5cm}void gear\-::\-Ti\-Xml\-Element\-::\-Set\-Attribute (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name, }
\item[{const char $\ast$}]{value}
\end{DoxyParamCaption}
)}\label{classgear_1_1TiXmlElement_abc32c7900cd9f02fd538990aea141771}


Sets an attribute of name to a given value. 

The attribute will be created if it does not exist, or changed if it does. 

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



References gear\-::\-Ti\-Xml\-Node\-::\-Get\-Document(), and gear\-::\-Ti\-Xml\-Attribute\-::\-Set\-Value().



Referenced by gear\-::\-Gear\-X\-M\-L\-::create\-X\-M\-L\-File(), gear\-::\-Gear\-Parameters\-X\-M\-L\-::get\-X\-M\-L\-For\-Parameters(), Set\-Attribute(), Set\-Double\-Attribute(), gear\-::\-Z\-Planar\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Si\-Planes\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Tracker\-Planes\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-F\-T\-D\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Fixed\-Pad\-Size\-Disk\-Layout\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Fixed\-Pad\-Angle\-Disk\-Layout\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Simple\-Material\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Rectangular\-Pad\-Row\-Layout\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-T\-P\-C\-Module\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-T\-P\-C\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Calorimeter\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Constant\-B\-Field\-X\-M\-L\-::to\-X\-M\-L(), and gear\-::\-Versatile\-Disk\-Row\-Layout\-X\-M\-L\-::to\-X\-M\-L().

\index{gear\-::\-Ti\-Xml\-Element@{gear\-::\-Ti\-Xml\-Element}!Set\-Attribute@{Set\-Attribute}}
\index{Set\-Attribute@{Set\-Attribute}!gear::TiXmlElement@{gear\-::\-Ti\-Xml\-Element}}
\subsubsection[{Set\-Attribute}]{\setlength{\rightskip}{0pt plus 5cm}void gear\-::\-Ti\-Xml\-Element\-::\-Set\-Attribute (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{name, }
\item[{const std\-::string \&}]{\-\_\-value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{classgear_1_1TiXmlElement_aea90a894a6273c9e4a6d434f3efa64ac}


S\-T\-L std\-::string form. 

S\-T\-L std\-::string form. 

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



References Set\-Attribute().

\index{gear\-::\-Ti\-Xml\-Element@{gear\-::\-Ti\-Xml\-Element}!Set\-Attribute@{Set\-Attribute}}
\index{Set\-Attribute@{Set\-Attribute}!gear::TiXmlElement@{gear\-::\-Ti\-Xml\-Element}}
\subsubsection[{Set\-Attribute}]{\setlength{\rightskip}{0pt plus 5cm}void gear\-::\-Ti\-Xml\-Element\-::\-Set\-Attribute (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name, }
\item[{int}]{value}
\end{DoxyParamCaption}
)}\label{classgear_1_1TiXmlElement_aca71f0850998e7c993b68b3369f63c7b}


Sets an attribute of name to a given value. 

The attribute will be created if it does not exist, or changed if it does. 

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



References Set\-Attribute().

\index{gear\-::\-Ti\-Xml\-Element@{gear\-::\-Ti\-Xml\-Element}!Set\-Double\-Attribute@{Set\-Double\-Attribute}}
\index{Set\-Double\-Attribute@{Set\-Double\-Attribute}!gear::TiXmlElement@{gear\-::\-Ti\-Xml\-Element}}
\subsubsection[{Set\-Double\-Attribute}]{\setlength{\rightskip}{0pt plus 5cm}void gear\-::\-Ti\-Xml\-Element\-::\-Set\-Double\-Attribute (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name, }
\item[{double}]{value}
\end{DoxyParamCaption}
)}\label{classgear_1_1TiXmlElement_aacce39ea256c27806d479db73b883bbe}


Sets an attribute of name to a given value. 

The attribute will be created if it does not exist, or changed if it does. 

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



References Set\-Attribute().



Referenced by gear\-::\-Gear\-Parameters\-X\-M\-L\-::get\-X\-M\-L\-For\-Parameters(), gear\-::\-Si\-Planes\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Tracker\-Planes\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Z\-Planar\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Fixed\-Pad\-Size\-Disk\-Layout\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-F\-T\-D\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Fixed\-Pad\-Angle\-Disk\-Layout\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Simple\-Material\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Rectangular\-Pad\-Row\-Layout\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-T\-P\-C\-Module\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-T\-P\-C\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Constant\-B\-Field\-X\-M\-L\-::to\-X\-M\-L(), gear\-::\-Calorimeter\-Parameters\-X\-M\-L\-::to\-X\-M\-L(), and gear\-::\-Versatile\-Disk\-Row\-Layout\-X\-M\-L\-::to\-X\-M\-L().



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