libzypp 8.13.6
|
00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00009 00010 #ifndef ZYPP_REPO_VARIABLES_H_ 00011 #define ZYPP_REPO_VARIABLES_H_ 00012 00013 #include <iosfwd> 00014 #include <string> 00015 00016 #include "zypp/Url.h" 00017 #include "zypp/Arch.h" 00018 00019 namespace zypp 00020 { 00021 namespace repo 00022 { 00023 00029 struct RepoVariablesStringReplacer : public std::unary_function<std::string, std::string> 00030 { 00031 RepoVariablesStringReplacer(); 00032 00033 std::string operator()( const std::string &value ) const; 00034 00035 ~RepoVariablesStringReplacer(); 00036 00037 void resetVarCache( void ); 00038 00039 private: 00040 mutable Arch sysarch; 00041 mutable Arch basearch; 00042 mutable std::string releasever; 00043 }; 00044 00050 struct RepoVariablesUrlReplacer : public std::unary_function<Url, Url> 00051 { 00052 RepoVariablesUrlReplacer(); 00053 00054 Url operator()( const Url &url ) const; 00055 00056 ~RepoVariablesUrlReplacer(); 00057 00058 void resetVarCache( void ); 00059 00060 private: 00061 RepoVariablesStringReplacer replacer; 00062 }; 00063 00064 } // ns repo 00065 } // ns zypp 00066 00067 #endif 00068 00069 // vim: set ts=2 sts=2 sw=2 et ai: