libqi  1.12
qi/path/sdklayout.hpp
Go to the documentation of this file.
00001 
00013 #pragma once
00014 #ifndef _LIBQI_QI_PATH_SDKLAYOUT_HPP_
00015 #define _LIBQI_QI_PATH_SDKLAYOUT_HPP_
00016 
00017 # include <vector>
00018 # include <string>
00019 # include <qi/config.hpp>
00020 
00028 namespace qi
00029 {
00030 
00031   class PrivateSDKLayout;
00032 
00041   class QI_API SDKLayout //: boost::noncopyable
00042   {
00043   public:
00044 
00051     SDKLayout();
00052 
00057     explicit SDKLayout(const std::string &prefix, const std::string &mode = "");
00058 
00059     SDKLayout(const SDKLayout &rhs);
00060     SDKLayout &operator=(const SDKLayout &rhs);
00061 
00062     virtual ~SDKLayout();
00063 
00064 
00065 
00067     std::string sdkPrefix() const;
00068 
00070     std::vector<std::string> getSdkPrefixes() const;
00071 
00073     void addOptionalSdkPrefix(const char *prefix);
00074 
00076     void clearOptionalSdkPrefix();
00077 
00078 
00079 
00081     std::string findBin(const std::string &name) const;
00082 
00084     std::string findLib(const std::string &name) const;
00085 
00087     std::string findConf(const std::string &applicationName,
00088                                   const std::string &filename) const;
00089 
00091     std::string findData(const std::string &applicationName,
00092                          const std::string &filename) const;
00093 
00094 
00095 
00097     std::vector<std::string> confPaths(const std::string &applicationName="") const;
00098 
00100     std::vector<std::string> dataPaths(const std::string &applicationName="") const;
00101 
00103     std::vector<std::string> binPaths() const;
00104 
00106     std::vector<std::string> libPaths() const;
00107 
00108 
00109 
00111     std::string userWritableDataPath(const std::string &applicationName,
00112                                         const std::string &filename) const;
00113 
00115     std::string userWritableConfPath(const std::string &applicationName,
00116                                                  const std::string &filename="") const;
00117 
00118   private:
00119     // Pimpl
00120     PrivateSDKLayout* _private;
00121   };
00122 
00123 }
00124 
00125 #endif  // _LIBQI_QI_PATH_SDKLAYOUT_HPP_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines