Awali
Another Weighted Automata library
locations.hh
Go to the documentation of this file.
1 // This file is part of Awali.
2 // Copyright 2016-2022 Sylvain Lombardy, Victor Marsault, Jacques Sakarovitch
3 //
4 // Awali is a free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef AWALI_MAKEDIR_HH
18 #define AWALI_MAKEDIR_HH
19 
20 #include<string>
21 #include<vector>
22 #include<map>
23 
24 namespace awali { namespace dyn {
25 
26  namespace loading {
28  const std::string& get_dot_binary();
29 
32  std::vector<std::string> get_lib_directory();
33 
36  std::vector<std::string> get_dynlib_directory();
37 
40  std::vector<std::string> get_examples_directory();
41 
44  std::vector<std::string> get_sources_directory();
45 
47  std::vector<std::string> get_include_directory();
48 
51  std::vector<std::string> get_compilation_directory(std::string const& lname);
52 
55  std::vector<std::string> get_dyn_config_hh_directory();
57 
58  struct file_loc_t {
59  std::string dir;
60  std::string name;
61  std::string ext;
62  std::string type;
63  inline std::string full() const { return dir+"/"+name+"."+ext;}
64  };
65 
66  std::map<std::string,file_loc_t> example_automata(bool recurse = false);
67  std::map<std::string,file_loc_t> example_ratexps(bool recurse = false);
68  std::map<std::string,file_loc_t> examples
69  (
70  std::vector<std::string> subdirs = {"automata","ratexps"},
71  bool recurse = false
72  );
73  }
74 
75 }}//end of ns awali::dyn
76 
77 #endif
const std::string & get_dot_binary()
Return the binary of dot.
std::vector< std::string > get_lib_directory()
Returns the directories where the static modules are located, sorted by precedence.
std::vector< std::string > get_dynlib_directory()
Returns the directories where the dynamic library is located, sorted by precedence.
std::map< std::string, file_loc_t > example_automata(bool recurse=false)
std::vector< std::string > get_examples_directory()
Returns the directories where the example automata are stored, sorted by precedence.
std::vector< std::string > get_compilation_directory(std::string const &lname)
Returns the temporary compilation directory for the static module named lname.
std::vector< std::string > get_sources_directory()
Returns the directories where the module sources are located, sorted by precedence.
std::map< std::string, file_loc_t > example_ratexps(bool recurse=false)
std::vector< std::string > get_dyn_config_hh_directory()
Returns the directory where the config.hh file is located, stored by precedence.
std::vector< std::string > get_include_directory()
Returns the directories where the Awali headers are located.
std::map< std::string, file_loc_t > examples(std::vector< std::string > subdirs={"automata","ratexps"}, bool recurse=false)
Main namespace of Awali.
Definition: ato.hh:22
Definition: locations.hh:58
std::string dir
Definition: locations.hh:59
std::string ext
Definition: locations.hh:61
std::string name
Definition: locations.hh:60
std::string type
Definition: locations.hh:62
std::string full() const
Definition: locations.hh:63