\hypertarget{a00743}{\section{Skeleton\+T$<$ Point\+T $>$\+:\+:Iterator Class Reference}
\label{a00743}\index{Skeleton\+T$<$ Point\+T $>$\+::\+Iterator@{Skeleton\+T$<$ Point\+T $>$\+::\+Iterator}}
}


\hyperlink{a00743}{Iterator} class for the skeleton.  




{\ttfamily \#include $<$Object\+Types/\+Skeleton/\+Skeleton\+T.\+hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a00743_ada7c2898c4e47c9330197e1226a1d946}{Iterator} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\hyperlink{a00743_a22bab2e8916e2d84a844f39499c5f543}{Iterator} (\hyperlink{a00751}{Joint} $\ast$\+\_\+root)
\begin{DoxyCompactList}\small\item\em Constructor -\/ Creates an iterator for the given (sub-\/)tree. \end{DoxyCompactList}\item 
\hyperlink{a00743_a7e7445ba1cfdd7664e4e3274f4ef5f82}{Iterator} (const \hyperlink{a00743}{Iterator} \&other)
\begin{DoxyCompactList}\small\item\em Copy Constructor -\/ Creates a copy of the given iterator. \end{DoxyCompactList}\item 
\hypertarget{a00743_a1781b0c6d57be12fe954c3bcefab4030}{\hyperlink{a00743_a1781b0c6d57be12fe954c3bcefab4030}{$\sim$\+Iterator} ()}\label{a00743_a1781b0c6d57be12fe954c3bcefab4030}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\hyperlink{a00743}{Iterator} \& \hyperlink{a00743_a8b005f609f70a73d2a0695b68c234529}{operator=} (const \hyperlink{a00743}{Iterator} \&other)
\begin{DoxyCompactList}\small\item\em Assignment Operator. \end{DoxyCompactList}\item 
\hyperlink{a00743}{Iterator} \& \hyperlink{a00743_a91cdb7f384108d63294ebee2641bea0d}{operator++} ()
\begin{DoxyCompactList}\small\item\em Increase the iterator. \end{DoxyCompactList}\item 
bool \hyperlink{a00743_a9e7b6ead9f1ef0b436f6e6030a088ccc}{operator!=} (const \hyperlink{a00743}{Iterator} \&other) const 
\begin{DoxyCompactList}\small\item\em Compares the iterators. \end{DoxyCompactList}\item 
bool \hyperlink{a00743_ab7db8bcd84ce1e1c8d630b5f24acf031}{operator==} (const \hyperlink{a00743}{Iterator} \&other) const 
\begin{DoxyCompactList}\small\item\em Compares the iterators. \end{DoxyCompactList}\item 
\hypertarget{a00743_a9189641e77b4f02ffba8417c21c29ae3}{\hyperlink{a00751}{Joint} $\ast$ \hyperlink{a00743_a9189641e77b4f02ffba8417c21c29ae3}{operator$\ast$} () const }\label{a00743_a9189641e77b4f02ffba8417c21c29ae3}

\begin{DoxyCompactList}\small\item\em Returns a pointer to the current joint. \end{DoxyCompactList}\item 
\hyperlink{a00751}{Joint} $\ast$ \hyperlink{a00743_a16588c21294f97a053daf6bcc7be3c8d}{operator-\/$>$} () const 
\begin{DoxyCompactList}\small\item\em Returns a pointer to the current joint. \end{DoxyCompactList}\item 
\hyperlink{a00743_a38931e742c8d8518ca0c84076c623e2c}{operator bool} () const 
\begin{DoxyCompactList}\small\item\em Returns false if the iterator is done iterating. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a00751}{Joint} $\ast$ \hyperlink{a00743_a4c8084fdbd3c1a89ebb182fab938806b}{next\+Sibling} (\hyperlink{a00751}{Joint} $\ast$\+\_\+p\+Parent, \hyperlink{a00751}{Joint} $\ast$\+\_\+p\+Joint)
\begin{DoxyCompactList}\small\item\em Given a parent and one of its child nodes this method finds and returns the next sibling. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00743_a30bfb8a0da407b6b48346e3e9dbebee9}{\hyperlink{a00751}{Joint} $\ast$ {\bfseries p\+Current\+\_\+}}\label{a00743_a30bfb8a0da407b6b48346e3e9dbebee9}

\item 
\hypertarget{a00743_afaa5b25de93c3040d80d34abd44a7379}{std\+::stack$<$ \hyperlink{a00751}{Joint} $\ast$ $>$ {\bfseries st\+Joints\+\_\+}}\label{a00743_afaa5b25de93c3040d80d34abd44a7379}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class Point\+T$>$class Skeleton\+T$<$ Point\+T $>$\+::\+Iterator}

\hyperlink{a00743}{Iterator} class for the skeleton. 

This iterator can be used to iterate over all joints in a top-\/down (root to leaf), left-\/to-\/right order. It is possible to iterate over subtrees by constructing an iterator passing the root of the subtree as parameter. Cast the iterator to boolean to test if it iterated all joints. 

Definition at line 88 of file Skeleton\+T.\+hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a00743_ada7c2898c4e47c9330197e1226a1d946}{\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!Iterator@{Iterator}}
\index{Iterator@{Iterator}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection[{Iterator}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Skeleton\+T}$<$ Point\+T $>$\+::Iterator\+::\+Iterator (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{a00743_ada7c2898c4e47c9330197e1226a1d946}


Default constructor. 

Creates an invalid iterator, not pointing to anything yet. 

Definition at line 79 of file Skeleton\+T.\+cc.

\hypertarget{a00743_a22bab2e8916e2d84a844f39499c5f543}{\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!Iterator@{Iterator}}
\index{Iterator@{Iterator}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection[{Iterator}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Skeleton\+T}$<$ Point\+T $>$\+::Iterator\+::\+Iterator (
\begin{DoxyParamCaption}
\item[{{\bf Joint} $\ast$}]{\+\_\+root}
\end{DoxyParamCaption}
)}}\label{a00743_a22bab2e8916e2d84a844f39499c5f543}


Constructor -\/ Creates an iterator for the given (sub-\/)tree. 

The iterator will traverse all nodes below \+\_\+root (inclusive \+\_\+root) in a top-\/down, \char`\"{}left-\/to-\/right\char`\"{} manner. 

Definition at line 92 of file Skeleton\+T.\+cc.

\hypertarget{a00743_a7e7445ba1cfdd7664e4e3274f4ef5f82}{\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!Iterator@{Iterator}}
\index{Iterator@{Iterator}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection[{Iterator}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Skeleton\+T}$<$ Point\+T $>$\+::Iterator\+::\+Iterator (
\begin{DoxyParamCaption}
\item[{const {\bf Iterator} \&}]{other}
\end{DoxyParamCaption}
)}}\label{a00743_a7e7445ba1cfdd7664e4e3274f4ef5f82}


Copy Constructor -\/ Creates a copy of the given iterator. 

This iterator will become a copy of the given iterator. They both point to the same position now, but iterate the tree independently. 

Definition at line 106 of file Skeleton\+T.\+cc.



\subsection{Member Function Documentation}
\hypertarget{a00743_a4c8084fdbd3c1a89ebb182fab938806b}{\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!next\+Sibling@{next\+Sibling}}
\index{next\+Sibling@{next\+Sibling}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection[{next\+Sibling}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Skeleton\+T}$<$ Point\+T $>$\+::{\bf Joint} $\ast$ {\bf Skeleton\+T}$<$ Point\+T $>$\+::Iterator\+::next\+Sibling (
\begin{DoxyParamCaption}
\item[{{\bf Joint} $\ast$}]{\+\_\+p\+Parent, }
\item[{{\bf Joint} $\ast$}]{\+\_\+p\+Joint}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{a00743_a4c8084fdbd3c1a89ebb182fab938806b}


Given a parent and one of its child nodes this method finds and returns the next sibling. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+p\+Parent} & The parent node, take it from the stack \\
\hline
{\em \+\_\+p\+Joint} & A child node of \+\_\+p\+Parent, its next sibling is wanted \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Either a pointer to the sibling or 0 if there are no more siblings 
\end{DoxyReturn}


Definition at line 264 of file Skeleton\+T.\+cc.

\hypertarget{a00743_a38931e742c8d8518ca0c84076c623e2c}{\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator bool@{operator bool}}
\index{operator bool@{operator bool}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection[{operator bool}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Skeleton\+T}$<$ Point\+T $>$\+::Iterator\+::operator bool (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}\label{a00743_a38931e742c8d8518ca0c84076c623e2c}


Returns false if the iterator is done iterating. 

There are two ways to test if the joint iterator has reached its end. Cast it to bool and test if it is false or compare it to the return value of \hyperlink{a01190_ad5e80649bdb640885fd1b905896d6fbb}{Skeleton\+T$<$$>$\+::end}. 

Definition at line 249 of file Skeleton\+T.\+cc.

\hypertarget{a00743_a9e7b6ead9f1ef0b436f6e6030a088ccc}{\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator"!=@{operator"!=}}
\index{operator"!=@{operator"!=}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection[{operator"!=}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ bool {\bf Skeleton\+T}$<$ Point\+T $>$\+::Iterator\+::operator!= (
\begin{DoxyParamCaption}
\item[{const {\bf Iterator} \&}]{other}
\end{DoxyParamCaption}
) const}}\label{a00743_a9e7b6ead9f1ef0b436f6e6030a088ccc}


Compares the iterators. 

The iterators are equal if they point to the same joint, no matter where they began to iterate. 

Definition at line 193 of file Skeleton\+T.\+cc.

\hypertarget{a00743_a91cdb7f384108d63294ebee2641bea0d}{\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator++@{operator++}}
\index{operator++@{operator++}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection[{operator++}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Skeleton\+T}$<$ Point\+T $>$\+::{\bf Iterator} \& {\bf Skeleton\+T}$<$ Point\+T $>$\+::Iterator\+::operator++ (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{a00743_a91cdb7f384108d63294ebee2641bea0d}


Increase the iterator. 

The iterator will be changed to point to the next child, or whatever joint is next. 

Definition at line 147 of file Skeleton\+T.\+cc.

\hypertarget{a00743_a16588c21294f97a053daf6bcc7be3c8d}{\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator-\/$>$@{operator-\/$>$}}
\index{operator-\/$>$@{operator-\/$>$}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection[{operator-\/$>$}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Skeleton\+T}$<$ Point\+T $>$\+::{\bf Joint} $\ast$ {\bf Skeleton\+T}$<$ Point\+T $>$\+::Iterator\+::operator-\/$>$ (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}\label{a00743_a16588c21294f97a053daf6bcc7be3c8d}


Returns a pointer to the current joint. 

This way it is possible to access the joint by calling\+: 
\begin{DoxyCode}
\hyperlink{a00743}{SkeletonT<>::Iterator} it;
...
it->method();
\end{DoxyCode}
 

Definition at line 235 of file Skeleton\+T.\+cc.

\hypertarget{a00743_a8b005f609f70a73d2a0695b68c234529}{\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator=@{operator=}}
\index{operator=@{operator=}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection[{operator=}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ {\bf Skeleton\+T}$<$ Point\+T $>$\+::{\bf Iterator} \& {\bf Skeleton\+T}$<$ Point\+T $>$\+::Iterator\+::operator= (
\begin{DoxyParamCaption}
\item[{const {\bf Iterator} \&}]{other}
\end{DoxyParamCaption}
)}}\label{a00743_a8b005f609f70a73d2a0695b68c234529}


Assignment Operator. 

Assign values from given iterator to this iterator and also return self 

Definition at line 132 of file Skeleton\+T.\+cc.

\hypertarget{a00743_ab7db8bcd84ce1e1c8d630b5f24acf031}{\index{Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}!operator==@{operator==}}
\index{operator==@{operator==}!Skeleton\+T\+::\+Iterator@{Skeleton\+T\+::\+Iterator}}
\subsubsection[{operator==}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Point\+T $>$ bool {\bf Skeleton\+T}$<$ Point\+T $>$\+::Iterator\+::operator== (
\begin{DoxyParamCaption}
\item[{const {\bf Iterator} \&}]{other}
\end{DoxyParamCaption}
) const}}\label{a00743_ab7db8bcd84ce1e1c8d630b5f24acf031}


Compares the iterators. 

The iterators are equal if they point to the same joint, no matter where they began to iterate. 

Definition at line 206 of file Skeleton\+T.\+cc.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Object\+Types/\+Skeleton/Skeleton\+T.\+hh\item 
Object\+Types/\+Skeleton/Skeleton\+T.\+cc\end{DoxyCompactItemize}
