\hypertarget{a00744}{\section{Open\+Mesh\+:\+:Python\+:\+:Iterator\+Wrapper\+T$<$ Iterator, n\+\_\+items $>$ Class Template Reference}
\label{a00744}\index{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T$<$ Iterator, n\+\_\+items $>$@{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T$<$ Iterator, n\+\_\+items $>$}}
}


{\ttfamily \#include $<$libs\+\_\+required/\+Open\+Mesh/src/\+Python/\+Iterator.\+hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a00744_a12fa6a51caaee41796501a106ed3100c}{Iterator\+Wrapper\+T} (const \hyperlink{a00991}{Poly\+Mesh} \&\+\_\+mesh, typename Iterator\+::value\+\_\+type \+\_\+hnd, bool \+\_\+skip=false)
\item 
\hyperlink{a00744_a16c36edd15526c5249ef56a028c8caed}{Iterator\+Wrapper\+T} (const \hyperlink{a01335}{Tri\+Mesh} \&\+\_\+mesh, typename Iterator\+::value\+\_\+type \+\_\+hnd, bool \+\_\+skip=false)
\item 
\hyperlink{a00744}{Iterator\+Wrapper\+T} \hyperlink{a00744_a6b49d9626ebee0d51322c17a84d87a3d}{iter} () const 
\item 
Iterator\+::value\+\_\+type \hyperlink{a00744_a57a3bf723bdca89baf534ffd07106030}{next} ()
\item 
unsigned int \hyperlink{a00744_aae5800629ad4ccb0c40f911c89d9a724}{len} () const 
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00744_a2c297d2018ab5693fe653792e2606590}{const \hyperlink{a00979}{Open\+Mesh\+::\+Poly\+Connectivity} \& {\bfseries mesh\+\_\+}}\label{a00744_a2c297d2018ab5693fe653792e2606590}

\item 
\hypertarget{a00744_ae285351da4718ff2d880dc5bc8bb2f80}{size\+\_\+t(Open\+Mesh\+::\+Array\+Kernel\+::$\ast$ {\bfseries n\+\_\+items\+\_\+} )() const }\label{a00744_ae285351da4718ff2d880dc5bc8bb2f80}

\item 
\hypertarget{a00744_ad151d1d34a74eb00e17cf946cffa1f42}{Iterator {\bfseries iterator\+\_\+}}\label{a00744_ad151d1d34a74eb00e17cf946cffa1f42}

\item 
\hypertarget{a00744_aaab240e0ac855a13b4fe7a75b3661d19}{Iterator {\bfseries iterator\+\_\+end\+\_\+}}\label{a00744_aaab240e0ac855a13b4fe7a75b3661d19}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class Iterator, size\+\_\+t(\+Open\+Mesh\+::\+Array\+Kernel\+::$\ast$)() const n\+\_\+items$>$class Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T$<$ Iterator, n\+\_\+items $>$}

Wrapper for mesh item iterators.

This class template is used to wrap mesh item iterators for Python. It implements Python's iterator protocol (the magic methods \+\_\+\+\_\+iter\+\_\+\+\_\+ and \+\_\+\+\_\+next\+\_\+\+\_\+).


\begin{DoxyTemplParams}{Template Parameters}
{\em Iterator} & An iterator type. \\
\hline
{\em n\+\_\+items} & A member function pointer that points to the mesh function that returns the number of items to iterate over (e.\+g. n\+\_\+vertices). \\
\hline
\end{DoxyTemplParams}


Definition at line 21 of file Iterator.\+hh.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{a00744_a12fa6a51caaee41796501a106ed3100c}{\index{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T@{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}!Iterator\+Wrapper\+T@{Iterator\+Wrapper\+T}}
\index{Iterator\+Wrapper\+T@{Iterator\+Wrapper\+T}!Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T@{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}}
\subsubsection[{Iterator\+Wrapper\+T}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Iterator, size\+\_\+t(\+Open\+Mesh\+::\+Array\+Kernel\+::$\ast$)() const n\+\_\+items$>$ {\bf Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}$<$ Iterator, n\+\_\+items $>$\+::{\bf Iterator\+Wrapper\+T} (
\begin{DoxyParamCaption}
\item[{const {\bf Poly\+Mesh} \&}]{\+\_\+mesh, }
\item[{typename Iterator\+::value\+\_\+type}]{\+\_\+hnd, }
\item[{bool}]{\+\_\+skip = {\ttfamily false}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00744_a12fa6a51caaee41796501a106ed3100c}
Constructor


\begin{DoxyParams}{Parameters}
{\em \+\_\+mesh} & The mesh that contains the items to iterate over. \\
\hline
{\em \+\_\+hnd} & The handle of the first item to iterate over. \\
\hline
{\em \+\_\+skip} & Specifies if deleted/hidden elements are skipped. \\
\hline
\end{DoxyParams}


Definition at line 31 of file Iterator.\+hh.

\hypertarget{a00744_a16c36edd15526c5249ef56a028c8caed}{\index{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T@{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}!Iterator\+Wrapper\+T@{Iterator\+Wrapper\+T}}
\index{Iterator\+Wrapper\+T@{Iterator\+Wrapper\+T}!Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T@{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}}
\subsubsection[{Iterator\+Wrapper\+T}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Iterator, size\+\_\+t(\+Open\+Mesh\+::\+Array\+Kernel\+::$\ast$)() const n\+\_\+items$>$ {\bf Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}$<$ Iterator, n\+\_\+items $>$\+::{\bf Iterator\+Wrapper\+T} (
\begin{DoxyParamCaption}
\item[{const {\bf Tri\+Mesh} \&}]{\+\_\+mesh, }
\item[{typename Iterator\+::value\+\_\+type}]{\+\_\+hnd, }
\item[{bool}]{\+\_\+skip = {\ttfamily false}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00744_a16c36edd15526c5249ef56a028c8caed}
Constructor


\begin{DoxyParams}{Parameters}
{\em \+\_\+mesh} & The mesh that contains the items to iterate over. \\
\hline
{\em \+\_\+hnd} & The handle of the first item to iterate over. \\
\hline
{\em \+\_\+skip} & Specifies if deleted/hidden elements are skipped. \\
\hline
\end{DoxyParams}


Definition at line 44 of file Iterator.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a00744_a6b49d9626ebee0d51322c17a84d87a3d}{\index{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T@{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}!iter@{iter}}
\index{iter@{iter}!Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T@{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}}
\subsubsection[{iter}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Iterator, size\+\_\+t(\+Open\+Mesh\+::\+Array\+Kernel\+::$\ast$)() const n\+\_\+items$>$ {\bf Iterator\+Wrapper\+T} {\bf Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}$<$ Iterator, n\+\_\+items $>$\+::iter (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00744_a6b49d9626ebee0d51322c17a84d87a3d}
Implementation of Python's \+\_\+\+\_\+iter\+\_\+\+\_\+ magic method.

\begin{DoxyReturn}{Returns}
This iterator. 
\end{DoxyReturn}


Definition at line 55 of file Iterator.\+hh.

\hypertarget{a00744_aae5800629ad4ccb0c40f911c89d9a724}{\index{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T@{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}!len@{len}}
\index{len@{len}!Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T@{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}}
\subsubsection[{len}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Iterator, size\+\_\+t(\+Open\+Mesh\+::\+Array\+Kernel\+::$\ast$)() const n\+\_\+items$>$ unsigned int {\bf Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}$<$ Iterator, n\+\_\+items $>$\+::len (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00744_aae5800629ad4ccb0c40f911c89d9a724}
Implementation of Python's \+\_\+\+\_\+len\+\_\+\+\_\+ magic method.

\begin{DoxyReturn}{Returns}
The number of items in the mesh. 
\end{DoxyReturn}


Definition at line 83 of file Iterator.\+hh.

\hypertarget{a00744_a57a3bf723bdca89baf534ffd07106030}{\index{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T@{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}!next@{next}}
\index{next@{next}!Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T@{Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}}
\subsubsection[{next}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Iterator, size\+\_\+t(\+Open\+Mesh\+::\+Array\+Kernel\+::$\ast$)() const n\+\_\+items$>$ Iterator\+::value\+\_\+type {\bf Open\+Mesh\+::\+Python\+::\+Iterator\+Wrapper\+T}$<$ Iterator, n\+\_\+items $>$\+::next (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00744_a57a3bf723bdca89baf534ffd07106030}
Implementation of Python's \+\_\+\+\_\+next\+\_\+\+\_\+ magic method.

\begin{DoxyReturn}{Returns}
The next item. Raises a Python Stop\+Iteration exception if there are no more items. 
\end{DoxyReturn}


Definition at line 65 of file Iterator.\+hh.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
libs\+\_\+required/\+Open\+Mesh/src/\+Python/Iterator.\+hh\end{DoxyCompactItemize}
