Util--  1.1
pkgconfig.hh
Go to the documentation of this file.
1 #ifndef UTILMM_CONFIGFILE_HH
2 #define UTILMM_CONFIGFILE_HH
3 
4 #include <string>
5 #include <list>
7 
8 namespace utilmm
9 {
10  struct pkgconfig_error : public std::exception {};
11 
12  class process;
13 
14  class pkgconfig
15  {
16  typedef std::string string;
17 
18  public:
21  pkgconfig(string const& name);
22 
23  ~pkgconfig();
24 
26  string name() const;
28  string version() const;
29 
31  static bool exists(string const& name);
32 
34  string get(string const& var, string const& defval = string()) const;
35 
36  enum Modes {
37  All, Path, Other,
38  Static, Libraries
39  };
41  string compiler(Modes mode = pkgconfig::All) const;
43  string linker(Modes mode = pkgconfig::All) const;
44 
45  static std::list<string> packages();
46 
47  private:
49  string m_name;
50 
52  static string run(process& prs);
54  string run(string const& argument) const;
55  };
56 }
57 
58 #endif
59 
Modes
Definition: pkgconfig.hh:36
Definition: pkgconfig.hh:37
Definition: process.hh:20
Definition: pkgconfig.hh:10
Definition: pkgconfig.hh:14
Definition: pkgconfig.hh:37
Definition: auto_flag.hh:6
Definition: pkgconfig.hh:38

Generated on Mon Oct 8 2018 08:38:45 for Util-- by doxygen 1.8.11
SourceForge.net Project Page