\hypertarget{a00257}{\section{Open\+Mesh\+:\+:I\+O\+:\+:\+\_\+\+I\+O\+Manager\+\_\+ Class Reference}
\label{a00257}\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}}
}


{\ttfamily \#include $<$libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Core/\+I\+O/\+I\+O\+Manager.\+hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{a00257_a96b93ad4d6635a5fea110071bff19cfc}{read} (const std\+::string \&\+\_\+filename, \hyperlink{a00319}{Base\+Importer} \&\+\_\+bi, \hyperlink{a00941}{Options} \&\+\_\+opt)
\item 
bool \hyperlink{a00257_ae8b7820b71be36aa7097c89bbebff9bc}{read} (std\+::istream \&\+\_\+filename, const std\+::string \&\+\_\+ext, \hyperlink{a00319}{Base\+Importer} \&\+\_\+bi, \hyperlink{a00941}{Options} \&\+\_\+opt)
\item 
bool \hyperlink{a00257_a6493341522e1670c7bca82bdd5c1c89b}{write} (const std\+::string \&\+\_\+filename, \hyperlink{a00314}{Base\+Exporter} \&\+\_\+be, \hyperlink{a00941}{Options} \+\_\+opt=\hyperlink{a00941_a9f4f797b08c045b611eaa6f8d149da21a7e68f74f3e555a90cc6b3ea1b5fb42ac}{Options\+::\+Default}, std\+::streamsize \+\_\+precision=6)
\item 
bool \hyperlink{a00257_a3434323b42dda1dab53d05a720355eca}{write} (std\+::ostream \&\+\_\+filename, const std\+::string \&\+\_\+ext, \hyperlink{a00314}{Base\+Exporter} \&\+\_\+be, \hyperlink{a00941}{Options} \+\_\+opt=\hyperlink{a00941_a9f4f797b08c045b611eaa6f8d149da21a7e68f74f3e555a90cc6b3ea1b5fb42ac}{Options\+::\+Default}, std\+::streamsize \+\_\+precision=6)
\item 
\hypertarget{a00257_a118c87363cd9eab8d8e77c27f57c0e98}{bool \hyperlink{a00257_a118c87363cd9eab8d8e77c27f57c0e98}{can\+\_\+read} (const std\+::string \&\+\_\+format) const }\label{a00257_a118c87363cd9eab8d8e77c27f57c0e98}

\begin{DoxyCompactList}\small\item\em Returns true if the format is supported by one of the reader modules. \end{DoxyCompactList}\item 
\hypertarget{a00257_aa5ba61c712c47e3a5732cba9bd72c14d}{bool \hyperlink{a00257_aa5ba61c712c47e3a5732cba9bd72c14d}{can\+\_\+write} (const std\+::string \&\+\_\+format) const }\label{a00257_aa5ba61c712c47e3a5732cba9bd72c14d}

\begin{DoxyCompactList}\small\item\em Returns true if the format is supported by one of the writer modules. \end{DoxyCompactList}\item 
\hypertarget{a00257_af9d2946c2ac96bc66b2575656615b08d}{size\+\_\+t {\bfseries binary\+\_\+size} (const std\+::string \&\+\_\+format, \hyperlink{a00314}{Base\+Exporter} \&\+\_\+be, \hyperlink{a00941}{Options} \+\_\+opt=\hyperlink{a00941_a9f4f797b08c045b611eaa6f8d149da21a7e68f74f3e555a90cc6b3ea1b5fb42ac}{Options\+::\+Default})}\label{a00257_af9d2946c2ac96bc66b2575656615b08d}

\item 
const std\+::string \& \hyperlink{a00257_ac3d9b92b132ce16580099c8ccd5ef94a}{qt\+\_\+read\+\_\+filters} () const 
\item 
const std\+::string \& \hyperlink{a00257_a14a72706b4c13a3635cf448e9ce55b6b}{qt\+\_\+write\+\_\+filters} () const 
\item 
bool \hyperlink{a00257_afc523ce80234260b8d6f7084a5cbcb13}{register\+\_\+module} (\hyperlink{a00338}{Base\+Reader} $\ast$\+\_\+bl)
\item 
bool \hyperlink{a00257_a539db8979ec6980cd3e038bdc6292cdc}{register\+\_\+module} (\hyperlink{a00345}{Base\+Writer} $\ast$\+\_\+bw)
\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00257_a2e89c8f3493bdf30b7cb0aa3e8855f8a}{\hyperlink{a00257_a2e89c8f3493bdf30b7cb0aa3e8855f8a}{\+\_\+\+I\+O\+Manager\+\_\+} ()}\label{a00257_a2e89c8f3493bdf30b7cb0aa3e8855f8a}

\begin{DoxyCompactList}\small\item\em Constructor has nothing todo for the Manager. \end{DoxyCompactList}\item 
\hypertarget{a00257_a671abe11e4c99eecd6c9351d09e14d78}{\hyperlink{a00257_a671abe11e4c99eecd6c9351d09e14d78}{$\sim$\+\_\+\+I\+O\+Manager\+\_\+} ()}\label{a00257_a671abe11e4c99eecd6c9351d09e14d78}

\begin{DoxyCompactList}\small\item\em Destructor has nothing todo for the Manager. \end{DoxyCompactList}\item 
\hypertarget{a00257_ab17983c68189be2ccdf3dcdb166fbaa3}{void {\bfseries update\+\_\+read\+\_\+filters} ()}\label{a00257_ab17983c68189be2ccdf3dcdb166fbaa3}

\item 
\hypertarget{a00257_a87bb5aeb00fd451310804f8845632adb}{void {\bfseries update\+\_\+write\+\_\+filters} ()}\label{a00257_a87bb5aeb00fd451310804f8845632adb}

\item 
\hypertarget{a00257_a1176ee0573c10ce53df87f8abec79cbc}{const \hyperlink{a00345}{Base\+Writer} $\ast$ {\bfseries find\+\_\+writer} (const std\+::string \&\+\_\+format)}\label{a00257_a1176ee0573c10ce53df87f8abec79cbc}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00257_a8569c46609c68c0834cc5494c6aebc39}{std\+::set$<$ \hyperlink{a00338}{Base\+Reader} $\ast$ $>$ {\bfseries reader\+\_\+modules\+\_\+}}\label{a00257_a8569c46609c68c0834cc5494c6aebc39}

\item 
\hypertarget{a00257_a6643ad22c1d89b16f40a3e2ddc7a84d2}{std\+::set$<$ \hyperlink{a00345}{Base\+Writer} $\ast$ $>$ {\bfseries writer\+\_\+modules\+\_\+}}\label{a00257_a6643ad22c1d89b16f40a3e2ddc7a84d2}

\item 
\hypertarget{a00257_a0a626cc6a7b2bcca4c87e70e39a029f0}{std\+::string {\bfseries read\+\_\+filters\+\_\+}}\label{a00257_a0a626cc6a7b2bcca4c87e70e39a029f0}

\item 
\hypertarget{a00257_a5d2fec2f338d9f51fdb03e73c50f25cf}{std\+::string {\bfseries write\+\_\+filters\+\_\+}}\label{a00257_a5d2fec2f338d9f51fdb03e73c50f25cf}

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
O\+P\+E\+N\+M\+E\+S\+H\+D\+L\+L\+E\+X\+P\+O\+R\+T \hyperlink{a00257}{\+\_\+\+I\+O\+Manager\+\_\+} \& \hyperlink{a00257_a108ad05477eaa77502639b4ac3ee0d96}{I\+O\+Manager} ()
\end{DoxyCompactItemize}


\subsection{Detailed Description}
This is the real I\+O\+Manager class that is later encapsulated by \hyperlink{a01181}{Singleton\+T} to enforce its uniqueness. {\itshape I\+O\+Manager} is not meant to be used directly by the programmer -\/ the I\+O\+Manager alias exists for this task.

All reader/writer modules register themselves at this class. For reading or writing data all modules are asked to do the job. If no suitable module is found, an error is returned.

For the sake of reading, the target data structure is hidden behind the \hyperlink{a00319}{Base\+Importer} interface that takes care of adding vertices or faces.

Writing from a source structure is encapsulate similarly behind a \hyperlink{a00314}{Base\+Exporter} interface, providing iterators over vertices/faces to the writer modules.

\begin{DoxySeeAlso}{See also}
\hyperlink{mesh_io}{Read and write meshes from files} 
\end{DoxySeeAlso}


Definition at line 107 of file I\+O\+Manager.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a00257_ac3d9b92b132ce16580099c8ccd5ef94a}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}!qt\+\_\+read\+\_\+filters@{qt\+\_\+read\+\_\+filters}}
\index{qt\+\_\+read\+\_\+filters@{qt\+\_\+read\+\_\+filters}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}}
\subsubsection[{qt\+\_\+read\+\_\+filters}]{\setlength{\rightskip}{0pt plus 5cm}const std\+::string\& Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+\+::qt\+\_\+read\+\_\+filters (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00257_ac3d9b92b132ce16580099c8ccd5ef94a}
Returns all readable file extension + descriptions in one string. File formats are separated by {\ttfamily ;;}. Convenience function for Qt file dialogs. 

Definition at line 194 of file I\+O\+Manager.\+hh.

\hypertarget{a00257_a14a72706b4c13a3635cf448e9ce55b6b}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}!qt\+\_\+write\+\_\+filters@{qt\+\_\+write\+\_\+filters}}
\index{qt\+\_\+write\+\_\+filters@{qt\+\_\+write\+\_\+filters}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}}
\subsubsection[{qt\+\_\+write\+\_\+filters}]{\setlength{\rightskip}{0pt plus 5cm}const std\+::string\& Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+\+::qt\+\_\+write\+\_\+filters (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00257_a14a72706b4c13a3635cf448e9ce55b6b}
Returns all writeable file extension + descriptions in one string. File formats are separated by {\ttfamily ;;}. Convenience function for Qt file dialogs. 

Definition at line 201 of file I\+O\+Manager.\+hh.

\hypertarget{a00257_a96b93ad4d6635a5fea110071bff19cfc}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}!read@{read}}
\index{read@{read}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}}
\subsubsection[{read}]{\setlength{\rightskip}{0pt plus 5cm}bool Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+\+::read (
\begin{DoxyParamCaption}
\item[{const std\+::string \&}]{\+\_\+filename, }
\item[{{\bf Base\+Importer} \&}]{\+\_\+bi, }
\item[{{\bf Options} \&}]{\+\_\+opt}
\end{DoxyParamCaption}
)}}\label{a00257_a96b93ad4d6635a5fea110071bff19cfc}
Read a mesh from file \+\_\+filename. The target data structure is specified by the given \hyperlink{a00319}{Base\+Importer}. The {\ttfamily read} method consecutively queries all of its reader modules. True is returned upon success, false if all reader modules failed to interprete \+\_\+filename. 

Definition at line 92 of file I\+O\+Manager.\+cc.

\hypertarget{a00257_ae8b7820b71be36aa7097c89bbebff9bc}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}!read@{read}}
\index{read@{read}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}}
\subsubsection[{read}]{\setlength{\rightskip}{0pt plus 5cm}bool Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+\+::read (
\begin{DoxyParamCaption}
\item[{std\+::istream \&}]{\+\_\+filename, }
\item[{const std\+::string \&}]{\+\_\+ext, }
\item[{{\bf Base\+Importer} \&}]{\+\_\+bi, }
\item[{{\bf Options} \&}]{\+\_\+opt}
\end{DoxyParamCaption}
)}}\label{a00257_ae8b7820b71be36aa7097c89bbebff9bc}
Read a mesh from open std\+::istream \+\_\+is. The target data structure is specified by the given \hyperlink{a00319}{Base\+Importer}. The {\ttfamily sread} method consecutively queries all of its reader modules. True is returned upon success, false if all reader modules failed to use \+\_\+is. 

Definition at line 123 of file I\+O\+Manager.\+cc.

\hypertarget{a00257_afc523ce80234260b8d6f7084a5cbcb13}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}!register\+\_\+module@{register\+\_\+module}}
\index{register\+\_\+module@{register\+\_\+module}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}}
\subsubsection[{register\+\_\+module}]{\setlength{\rightskip}{0pt plus 5cm}bool Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+\+::register\+\_\+module (
\begin{DoxyParamCaption}
\item[{{\bf Base\+Reader} $\ast$}]{\+\_\+bl}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00257_afc523ce80234260b8d6f7084a5cbcb13}
Registers a new reader module. A call to this function should be implemented in the constructor of all classes derived from \hyperlink{a00338}{Base\+Reader}. 

Definition at line 222 of file I\+O\+Manager.\+hh.

\hypertarget{a00257_a539db8979ec6980cd3e038bdc6292cdc}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}!register\+\_\+module@{register\+\_\+module}}
\index{register\+\_\+module@{register\+\_\+module}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}}
\subsubsection[{register\+\_\+module}]{\setlength{\rightskip}{0pt plus 5cm}bool Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+\+::register\+\_\+module (
\begin{DoxyParamCaption}
\item[{{\bf Base\+Writer} $\ast$}]{\+\_\+bw}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00257_a539db8979ec6980cd3e038bdc6292cdc}
Registers a new writer module. A call to this function should be implemented in the constructor of all classed derived from \hyperlink{a00345}{Base\+Writer}. 

Definition at line 234 of file I\+O\+Manager.\+hh.

\hypertarget{a00257_a6493341522e1670c7bca82bdd5c1c89b}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}!write@{write}}
\index{write@{write}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}}
\subsubsection[{write}]{\setlength{\rightskip}{0pt plus 5cm}bool Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+\+::write (
\begin{DoxyParamCaption}
\item[{const std\+::string \&}]{\+\_\+filename, }
\item[{{\bf Base\+Exporter} \&}]{\+\_\+be, }
\item[{{\bf Options}}]{\+\_\+opt = {\ttfamily {\bf Options\+::\+Default}}, }
\item[{std\+::streamsize}]{\+\_\+precision = {\ttfamily 6}}
\end{DoxyParamCaption}
)}}\label{a00257_a6493341522e1670c7bca82bdd5c1c89b}
Write a mesh to file \+\_\+filename. The source data structure is specified by the given \hyperlink{a00314}{Base\+Exporter}. The {\ttfamily save} method consecutively queries all of its writer modules. True is returned upon success, false if all writer modules failed to write the requested format. \hyperlink{a00941}{Options} is determined by \+\_\+filename's extension. 

Definition at line 148 of file I\+O\+Manager.\+cc.

\hypertarget{a00257_a3434323b42dda1dab53d05a720355eca}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}!write@{write}}
\index{write@{write}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}}
\subsubsection[{write}]{\setlength{\rightskip}{0pt plus 5cm}bool Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+\+::write (
\begin{DoxyParamCaption}
\item[{std\+::ostream \&}]{\+\_\+filename, }
\item[{const std\+::string \&}]{\+\_\+ext, }
\item[{{\bf Base\+Exporter} \&}]{\+\_\+be, }
\item[{{\bf Options}}]{\+\_\+opt = {\ttfamily {\bf Options\+::\+Default}}, }
\item[{std\+::streamsize}]{\+\_\+precision = {\ttfamily 6}}
\end{DoxyParamCaption}
)}}\label{a00257_a3434323b42dda1dab53d05a720355eca}
Write a mesh to open std\+::ostream \+\_\+os. The source data structure is specified by the given \hyperlink{a00314}{Base\+Exporter}. The {\ttfamily save} method consecutively queries all of its writer modules. True is returned upon success, false if all writer modules failed to write the requested format. \hyperlink{a00941}{Options} is determined by \+\_\+filename's extension. 

Definition at line 177 of file I\+O\+Manager.\+cc.



\subsection{Friends And Related Function Documentation}
\hypertarget{a00257_a108ad05477eaa77502639b4ac3ee0d96}{\index{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}!I\+O\+Manager@{I\+O\+Manager}}
\index{I\+O\+Manager@{I\+O\+Manager}!Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+@{Open\+Mesh\+::\+I\+O\+::\+\_\+\+I\+O\+Manager\+\_\+}}
\subsubsection[{I\+O\+Manager}]{\setlength{\rightskip}{0pt plus 5cm}O\+P\+E\+N\+M\+E\+S\+H\+D\+L\+L\+E\+X\+P\+O\+R\+T {\bf \+\_\+\+I\+O\+Manager\+\_\+}\& I\+O\+Manager (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [friend]}}}\label{a00257_a108ad05477eaa77502639b4ac3ee0d96}
Declare the singleton getter function as friend to access the private constructor and destructor 

Definition at line 77 of file I\+O\+Manager.\+cc.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Core/\+I\+O/I\+O\+Manager.\+hh\item 
libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Core/\+I\+O/I\+O\+Manager.\+cc\end{DoxyCompactItemize}
