35 std::vector<std::string> v;
46 v.emplace_back(
".prm");
59 v.emplace_back(
".inp");
60 v.emplace_back(
".xda");
61 v.emplace_back(
".dbmesh");
62 v.emplace_back(
".dat");
63 v.emplace_back(
".plt");
64 v.emplace_back(
".nc");
65 v.emplace_back(
".msh");
69std::vector<std::string> &
86std::vector<std::string> &
105 , my_path_list(get_path_list(cls))
106 , my_suffix_list(get_suffix_list(cls))
113 const std::string &suffix,
114 const char * open_mode)
116 std::vector<std::string>::const_iterator path;
117 const std::vector<std::string>::const_iterator endp =
my_path_list.end();
119 std::string real_name;
123 <<
" directories " << std::endl;
132 real_name = *path + filename;
134 deallog <<
"PathSearch[" <<
cls <<
"] trying " << real_name
136 FILE *fp = fopen(real_name.c_str(), open_mode);
140 deallog <<
"PathSearch[" <<
cls <<
"] opened " << real_name
151 real_name = *path + filename + suffix;
153 deallog <<
"PathSearch[" <<
cls <<
"] trying " << real_name
155 FILE *fp = fopen(real_name.c_str(), open_mode);
159 deallog <<
"PathSearch[" <<
cls <<
"] opened " << real_name
167 return std::string(
"");
173 std::vector<std::string>::const_iterator suffix;
174 const std::vector<std::string>::const_iterator ends =
my_suffix_list.end();
185 return find(filename, *suffix, open_mode);
193 return std::string(
"");
206 std::vector<std::string> v;
218 else if (pos ==
front)
222 std::vector<std::string>::iterator i =
236 else if (pos ==
front)
240 std::vector<std::string>::iterator i =
std::string find(const std::string &filename, const char *open_mode="r")
static std::vector< std::string > & get_path_list(const std::string &cls)
static std::vector< std::string > & get_suffix_list(const std::string &cls)
static std::map< std::string, std::vector< std::string > > path_lists
void add_path(const std::string &path, Position pos=back)
std::vector< std::string > & my_suffix_list
static std::map< std::string, std::vector< std::string > > suffix_lists
static void add_class(const std::string &cls)
std::vector< std::string > & my_path_list
@ back
Add new item at end of list.
@ after_none
Add in path list after empty element.
@ front
Add new item at front of list.
void add_suffix(const std::string &suffix, Position pos=back)
std::map< std::string, std::vector< std::string > >::value_type map_type
PathSearch(const std::string &cls, const unsigned int debug=0)
static void initialize_classes()
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcFileNotFound(std::string arg1, std::string arg2)
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
#define AssertThrow(cond, exc)