![]() |
OpenWalnut
1.5.0dev
|
Define the interface which is injected into an WObjectNDIP. More...
#include <WMeshReaderInterface.h>
Inheritance diagram for WMeshReaderInterface:Public Member Functions | |
| virtual WTriangleMesh::SPtr | operator() (WProgressCombiner::SPtr progress, boost::filesystem::path file)=0 |
| Load the dataset. More... | |
| virtual | ~WMeshReaderInterface () |
| Destructor. More... | |
| std::string | getLine (std::shared_ptr< std::ifstream > ifs, const std::string &desc) const |
| Read a line from the given input stream and throw an exception on error. More... | |
| std::string | getLine (std::ifstream &ifs, const std::string &desc) const |
| Read a line from the given input stream and throw an exception on error. More... | |
Define the interface which is injected into an WObjectNDIP.
Remember that WObjectNDIP is a template class deriving from its template type. This way we can inject methods into the base class. It avoids derivation from WObjectNDIP.
This defines the caller-interface common to each mesh loader
Definition at line 51 of file WMeshReaderInterface.h.
|
virtual |
Destructor.
Definition at line 30 of file WMeshReaderInterface.cpp.
| std::string WMeshReaderInterface::getLine | ( | std::ifstream & | ifs, |
| const std::string & | desc | ||
| ) | const |
Read a line from the given input stream and throw an exception on error.
| ifs | the stream to read from |
| desc | the description for the exception. Provide some useful info here. |
Definition at line 40 of file WMeshReaderInterface.cpp.
| std::string WMeshReaderInterface::getLine | ( | std::shared_ptr< std::ifstream > | ifs, |
| const std::string & | desc | ||
| ) | const |
Read a line from the given input stream and throw an exception on error.
| ifs | the stream to read from |
| desc | the description for the exception. Provide some useful info here. |
Definition at line 35 of file WMeshReaderInterface.cpp.
Referenced by WMeshReaderFreesurfer::operator()().
Here is the caller graph for this function:
|
pure virtual |
Load the dataset.
Throws exceptions if appropriate. Refer to the implementing class.
| progress | the progress indicator |
| file | path to the file to load |
Implemented in WMeshReaderVTK, WMeshReaderOBJ, WMeshReaderFreesurfer, WMeshReaderFiberNavigator, WMeshReaderDIP, and WMeshReaderBrainVISA.