Flow123d  jenkins-Flow123d-linux-release-multijob-282
reader_instances.hh
Go to the documentation of this file.
1 /*
2  * reader_instances.hh
3  *
4  * Created on: Feb 13, 2014
5  * Author: jb
6  */
7 
8 #ifndef READER_INSTANCES_HH_
9 #define READER_INSTANCES_HH_
10 
11 
12 #include "mesh/msh_gmshreader.h"
13 #include "system/file_path.hh"
14 
15 
16 /**
17  * Auxiliary class to map filepaths to instances of readers.
18  */
20 public:
22 
23  /// Returns singleton instance
24  static ReaderInstances * instance();
25 
26  /**
27  * Returns mesh reader of get filepath. If reader doesn't exist, creates its.
28  */
29  std::shared_ptr<GmshMeshReader> get_reader(const FilePath &file_path);
30 
31 private:
32  /// Constructor
34 
35  /// Table of readers
37 };
38 
39 
40 #endif /* READER_INSTANCES_HH_ */
std::map< string, std::shared_ptr< GmshMeshReader > > ReaderTable
ReaderTable reader_table_
Table of readers.
ReaderInstances()
Constructor.
Dedicated class for storing path to input and output files.
Definition: file_path.hh:32
std::shared_ptr< GmshMeshReader > get_reader(const FilePath &file_path)
static ReaderInstances * instance()
Returns singleton instance.