30 std::shared_ptr<BaseMeshReader> reader_ptr;
32 reader_ptr = std::make_shared<GmshMeshReader>(file_name);
33 }
else if ( file_name.
extension() ==
".vtu" ) {
34 reader_ptr = std::make_shared<VtkMeshReader>(file_name);
36 THROW(BaseMeshReader::ExcWrongExtension()
37 << BaseMeshReader::EI_FileExtension(file_name.
extension()) << BaseMeshReader::EI_MeshFile((
string)file_name) );
39 reader_table_.insert( std::pair<
string, std::shared_ptr<BaseMeshReader>>(
string(file_name), reader_ptr) );
ReaderTable reader_table_
Table of readers.
std::shared_ptr< BaseMeshReader > get_reader(const FilePath &file_name)
ReaderInstances()
Constructor.
Dedicated class for storing path to input and output files.
static ReaderInstances * instance()
Returns singleton instance.
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.