\hypertarget{a08484}{}\section{Open\+Mesh\+:\+:IO\+:\+:Base\+Reader Class Reference}
\label{a08484}\index{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader@{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}}


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

Inheritance diagram for Open\+Mesh\+:\+:IO\+:\+:Base\+Reader\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=1.191489cm]{a08484}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08484_affd6cb98cb0883d0afc5edd2067b21fe}\label{a08484_affd6cb98cb0883d0afc5edd2067b21fe}} 
virtual \hyperlink{a08484_affd6cb98cb0883d0afc5edd2067b21fe}{$\sim$\+Base\+Reader} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a08484_a845929e9dc345159b03b30eb3fbfe0aa}\label{a08484_a845929e9dc345159b03b30eb3fbfe0aa}} 
virtual std\+::string \hyperlink{a08484_a845929e9dc345159b03b30eb3fbfe0aa}{get\+\_\+description} () const =0
\begin{DoxyCompactList}\small\item\em Returns a brief description of the file type that can be parsed. \end{DoxyCompactList}\item 
virtual std\+::string \hyperlink{a08484_a9e76bc7b1b46b7a8b4922d8ca5934419}{get\+\_\+extensions} () const =0
\item 
\mbox{\Hypertarget{a08484_ad89e93769bc1e41d8d465012e5c45512}\label{a08484_ad89e93769bc1e41d8d465012e5c45512}} 
virtual std\+::string \hyperlink{a08484_ad89e93769bc1e41d8d465012e5c45512}{get\+\_\+magic} () const
\begin{DoxyCompactList}\small\item\em Return magic bits used to determine file format. \end{DoxyCompactList}\item 
virtual bool \hyperlink{a08484_af4a32645528c1bf2043a9259b172f411}{read} (const std\+::string \&\+\_\+filename, \hyperlink{a08468}{Base\+Importer} \&\+\_\+bi, \hyperlink{a08480}{Options} \&\+\_\+opt)=0
\item 
virtual bool \hyperlink{a08484_a0fd4df36decf91cd91a7f363aae56065}{read} (std\+::istream \&\+\_\+is, \hyperlink{a08468}{Base\+Importer} \&\+\_\+bi, \hyperlink{a08480}{Options} \&\+\_\+opt)=0
\item 
virtual bool \hyperlink{a08484_accf5c3edc6b4f628d0a696c7d10fc475}{can\+\_\+u\+\_\+read} (const std\+::string \&\+\_\+filename) const
\begin{DoxyCompactList}\small\item\em Returns true if writer can parse \+\_\+filename (checks extension). \+\_\+filename can also provide an extension without a name for a file e.\+g. \+\_\+filename == \char`\"{}om\char`\"{} checks, if the reader can read the \char`\"{}om\char`\"{} extension. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a08484_a33974409ebeefacf4c4641483ac7cdf7}\label{a08484_a33974409ebeefacf4c4641483ac7cdf7}} 
bool {\bfseries check\+\_\+extension} (const std\+::string \&\+\_\+fname, const std\+::string \&\+\_\+ext) const
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Base class for reader modules. Reader modules access persistent data and pass them to the desired data structure by the means of a \hyperlink{a08468}{Base\+Importer} derivative. All reader modules must be derived from this class. 

Definition at line 89 of file Base\+Reader.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a08484_accf5c3edc6b4f628d0a696c7d10fc475}\label{a08484_accf5c3edc6b4f628d0a696c7d10fc475}} 
\index{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader@{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}!can\+\_\+u\+\_\+read@{can\+\_\+u\+\_\+read}}
\index{can\+\_\+u\+\_\+read@{can\+\_\+u\+\_\+read}!Open\+Mesh\+::\+I\+O\+::\+Base\+Reader@{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}}
\subsubsection{\texorpdfstring{can\+\_\+u\+\_\+read()}{can\_u\_read()}}
{\footnotesize\ttfamily bool Base\+Reader\+::can\+\_\+u\+\_\+read (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{\+\_\+filename }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Returns true if writer can parse \+\_\+filename (checks extension). \+\_\+filename can also provide an extension without a name for a file e.\+g. \+\_\+filename == \char`\"{}om\char`\"{} checks, if the reader can read the \char`\"{}om\char`\"{} extension. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+filename} & complete name of a file or just the extension \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true, if reader can read data with the given extension 
\end{DoxyReturn}


Reimplemented in \hyperlink{a08492_abbe833299f79b23de4bf4c1bf1580713}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}, \hyperlink{a08512_aa9cc1766e83cef52775f335e178dc5b4}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+P\+L\+Y\+Reader\+\_\+}, and \hyperlink{a08496_a6cac287b1366fda5a9f8c23145fafba9}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+M\+Reader\+\_\+}.



Definition at line 77 of file Base\+Reader.\+cc.

\mbox{\Hypertarget{a08484_a9e76bc7b1b46b7a8b4922d8ca5934419}\label{a08484_a9e76bc7b1b46b7a8b4922d8ca5934419}} 
\index{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader@{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}!get\+\_\+extensions@{get\+\_\+extensions}}
\index{get\+\_\+extensions@{get\+\_\+extensions}!Open\+Mesh\+::\+I\+O\+::\+Base\+Reader@{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}}
\subsubsection{\texorpdfstring{get\+\_\+extensions()}{get\_extensions()}}
{\footnotesize\ttfamily virtual std\+::string Open\+Mesh\+::\+I\+O\+::\+Base\+Reader\+::get\+\_\+extensions (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}

Returns a string with the accepted file extensions separated by a whitespace and in small caps. 

Implemented in \hyperlink{a08492_a36bf8b125fad9000bf91c99267e09420}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}, \hyperlink{a08512_a076d4d6d14f4c1ac9f963b135f86c8b4}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+P\+L\+Y\+Reader\+\_\+}, \hyperlink{a08524_a974b4bf5f40e54b2a4db5cce43570196}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+S\+T\+L\+Reader\+\_\+}, \hyperlink{a08496_abc8aef97e6ffd9db30ec8f8418f86485}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+M\+Reader\+\_\+}, and \hyperlink{a08488_a8619b817593f5e88ddbded9cc94cea41}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+B\+J\+Reader\+\_\+}.

\mbox{\Hypertarget{a08484_af4a32645528c1bf2043a9259b172f411}\label{a08484_af4a32645528c1bf2043a9259b172f411}} 
\index{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader@{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}!read@{read}}
\index{read@{read}!Open\+Mesh\+::\+I\+O\+::\+Base\+Reader@{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}}
\subsubsection{\texorpdfstring{read()}{read()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily virtual bool Open\+Mesh\+::\+I\+O\+::\+Base\+Reader\+::read (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{\+\_\+filename,  }\item[{\hyperlink{a08468}{Base\+Importer} \&}]{\+\_\+bi,  }\item[{\hyperlink{a08480}{Options} \&}]{\+\_\+opt }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Reads a mesh given by a filename. Usually this method opens a stream and passes it to stream read method. Acceptance checks by filename extension can be placed here.

\hyperlink{a08480}{Options} can be passed via \+\_\+opt. After execution \+\_\+opt contains the \hyperlink{a08480}{Options} that were available 

Implemented in \hyperlink{a08492_ae6abbcd58b42708cdaf454a92a8e42c3}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}, \hyperlink{a08512_aab6bc64265a3c22d09dde93e9e539ef5}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+P\+L\+Y\+Reader\+\_\+}, \hyperlink{a08524_ab13615c05aef446846cf177b439bdeb7}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+S\+T\+L\+Reader\+\_\+}, \hyperlink{a08496_a882837d0b59be32741d8d9e7578f3f62}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+M\+Reader\+\_\+}, and \hyperlink{a08488_a63954abd80bd199f5e6bd76e2346cd34}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+B\+J\+Reader\+\_\+}.

\mbox{\Hypertarget{a08484_a0fd4df36decf91cd91a7f363aae56065}\label{a08484_a0fd4df36decf91cd91a7f363aae56065}} 
\index{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader@{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}!read@{read}}
\index{read@{read}!Open\+Mesh\+::\+I\+O\+::\+Base\+Reader@{Open\+Mesh\+::\+I\+O\+::\+Base\+Reader}}
\subsubsection{\texorpdfstring{read()}{read()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily virtual bool Open\+Mesh\+::\+I\+O\+::\+Base\+Reader\+::read (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{\+\_\+is,  }\item[{\hyperlink{a08468}{Base\+Importer} \&}]{\+\_\+bi,  }\item[{\hyperlink{a08480}{Options} \&}]{\+\_\+opt }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

Reads a mesh given by a std\+::stream. This method usually uses the same stream reading method that read uses. \hyperlink{a08480}{Options} can be passed via \+\_\+opt. After execution \+\_\+opt contains the \hyperlink{a08480}{Options} that were available.

Please make sure that if \+\_\+is is std\+::ifstream, the correct std\+::ios\+\_\+base\+::openmode flags are set. 

Implemented in \hyperlink{a08492_aa94f52dc263700daa126a32ec1018e2f}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+F\+F\+Reader\+\_\+}, \hyperlink{a08512_ad635f4e78958b38147aad4b0ab910c45}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+P\+L\+Y\+Reader\+\_\+}, \hyperlink{a08524_ab0015a00f47a24d94dde0ee81a76666a}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+S\+T\+L\+Reader\+\_\+}, \hyperlink{a08496_a9a4d62c85043026f4ce5a96ec8edda96}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+M\+Reader\+\_\+}, and \hyperlink{a08488_a3aa2dc8668159e54b09cc573a89b49be}{Open\+Mesh\+::\+I\+O\+::\+\_\+\+O\+B\+J\+Reader\+\_\+}.



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