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     private:
00046         string m_name;
00047 
00049         static string run(process& prs);
00051         string run(string const& argument) const;
00052      };
00053 }
00054 
00055 #endif
00056 

Generated on Tue Feb 19 10:51:01 2008 for Util-- by doxygen 1.5.3
SourceForge.net Project Page