16 #ifndef dealii__path_search_h 17 #define dealii__path_search_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 30 DEAL_II_NAMESPACE_OPEN
106 const unsigned int debug=0);
124 std::string
find (
const std::string &filename,
125 const char *open_mode =
"r");
145 std::string
find (
const std::string &filename,
146 const std::string &suffix,
147 const char *open_mode =
"r");
152 template <
class StreamType>
153 void show(StreamType &stream)
const;
180 <<
" must be registered before referring it in PathSearch.");
187 std::string, std::string,
188 <<
"The file \"" << arg1 <<
"\" was not found in the path for " 189 <<
"files of class " << arg2 <<
".");
195 typedef std::map<std::string, std::vector<std::string> >::value_type
map_type;
222 static std::map<std::string, std::vector<std::string> >
path_lists;
254 template <
class StreamType>
259 out <<
"DEAL_II_" <<
cls <<
"PATH=\"";
261 for (std::vector<std::string>::iterator p =
my_path_list.begin();
269 out <<
'"' << std::endl <<
" Suffixes";
270 for (std::vector<std::string>::iterator s =
my_suffix_list.begin();
272 out <<
" \"" << *s <<
'"';
276 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
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)
std::map< std::string, std::vector< std::string > >::value_type map_type
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.