pkgconfig.hh
Go to the documentation of this file.
00001 #ifndef UTILMM_CONFIGFILE_HH
00002 #define UTILMM_CONFIGFILE_HH
00003 
00004 #include <string>
00005 #include <utilmm/configfile/exceptions.hh>
00006 
00007 namespace utilmm
00008 {
00009     struct pkgconfig_error : public std::exception {};
00010 
00011     class process;
00012     
00013     class pkgconfig
00014     {
00015         typedef std::string string;
00016       
00017     public:
00020         pkgconfig(string const& name);
00021 
00022         ~pkgconfig();
00023 
00025         string name() const;
00027         string version() const;
00028 
00030         static bool exists(string const& name);
00031 
00033         string get(string const& var, string const& defval = string()) const;
00034         
00035         enum Modes {
00036             All, Path, Other,
00037             Static, Libraries
00038         };
00040         string compiler(Modes mode = pkgconfig::All) const;
00042         string linker(Modes mode = pkgconfig::All) const;
00043 
00044         static std::list<string> packages();
00045         
00046     private:
00048         string m_name;
00049 
00051         static string run(process& prs);
00053         string run(string const& argument) const;
00054      };
00055 }
00056 
00057 #endif
00058 


utilmm
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Wed Sep 16 2015 07:05:43