16 #ifndef dealii_path_search_h 17 #define dealii_path_search_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/exceptions.h> 31 DEAL_II_NAMESPACE_OPEN
125 find(
const std::string &filename,
const char *open_mode =
"r");
146 find(
const std::string &filename,
147 const std::string &suffix,
148 const char * open_mode =
"r");
153 template <
class StreamType>
155 show(StreamType &stream)
const;
183 <<
"The class " << arg1
184 <<
" must be registered before referring it in PathSearch.");
193 <<
"The file \"" << arg1 <<
"\" was not found in the path for " 194 <<
"files of class " << arg2 <<
".");
200 using map_type = std::map<std::string, std::vector<std::string>>::value_type;
212 static std::vector<std::string> &
219 static std::vector<std::string> &
230 static std::map<std::string, std::vector<std::string>>
path_lists;
262 template <
class StreamType>
266 out <<
"DEAL_II_" <<
cls <<
"PATH=\"";
275 out <<
'"' << std::endl <<
" Suffixes";
277 out <<
" \"" << s <<
'"';
281 DEAL_II_NAMESPACE_CLOSE
void show(StreamType &stream) const
#define DeclException2(Exception2, type1, type2, outsequence)
Add in path list after empty element.
static std::map< std::string, std::vector< std::string > > path_lists
static void add_class(const std::string &cls)
void add_path(const std::string &path, Position pos=back)
static std::map< std::string, std::vector< std::string > > suffix_lists
static std::vector< std::string > & get_suffix_list(const std::string &cls)
Add new item at end of list.
std::vector< std::string > & my_suffix_list
std::map< std::string, std::vector< std::string > >::value_type map_type
static ::ExceptionBase & ExcFileNotFound(std::string arg1, std::string arg2)
static void initialize_classes()
std::vector< std::string > & my_path_list
#define DeclException1(Exception1, type1, outsequence)
std::string find(const std::string &filename, const char *open_mode="r")
static ::ExceptionBase & ExcNoClass(std::string arg1)
static std::vector< std::string > & get_path_list(const std::string &cls)
void add_suffix(const std::string &suffix, Position pos=back)
PathSearch(const std::string &cls, const unsigned int debug=0)
Add new item at front of list.