17 #ifndef __deal2__path_search_h 18 #define __deal2__path_search_h 21 #include <deal.II/base/config.h> 115 const unsigned int debug=0);
148 std::string
find (
const std::string &filename,
149 const char *open_mode =
"r");
185 std::string
find (
const std::string &filename,
186 const std::string &suffix,
187 const char *open_mode =
"r");
193 template <
class STREAM>
194 void show(STREAM &stream)
const;
227 <<
" must be registered before referring it in PathSearch");
235 std::string, std::string,
236 <<
"The file \"" << arg1
237 <<
"\" was not found in the path for files of class " 245 typedef std::map<std::string, std::vector<std::string> >::value_type
map_type;
277 static std::map<std::string, std::vector<std::string> >
path_lists;
312 template <
class STREAM>
317 out <<
"DEAL_II_" <<
cls <<
"PATH=\"";
319 for (std::vector<std::string>::iterator p =
my_path_list.begin();
327 out <<
'"' << std::endl <<
" Suffixes";
328 for (std::vector<std::string>::iterator s =
my_suffix_list.begin();
330 out <<
" \"" << *s <<
'"';
334 DEAL_II_NAMESPACE_CLOSE
static std::map< std::string, std::vector< std::string > > suffix_lists
static void add_class(const std::string &cls)
Add in path list after empty element.
static std::vector< std::string > & get_suffix_list(const std::string &cls)
static std::vector< std::string > & get_path_list(const std::string &cls)
void add_path(const std::string &path, Position pos=back)
DeclException1(ExcNoClass, std::string,<< "The class "<< arg1<< " must be registered before referring it in PathSearch")
Add new item at end of list.
std::vector< std::string > & my_suffix_list
std::vector< std::string > & my_path_list
std::string find(const std::string &filename, const char *open_mode="r")
std::map< std::string, std::vector< std::string > >::value_type map_type
static void initialize_classes()
void add_suffix(const std::string &suffix, Position pos=back)
static std::map< std::string, std::vector< std::string > > path_lists
PathSearch(const std::string &cls, const unsigned int debug=0)
void show(STREAM &stream) const
Add new item at front of list.
DeclException2(ExcFileNotFound, std::string, std::string,<< "The file \""<< arg1<< "\" was not found in the path for files of class "<< arg2)