libzypp
10.5.0
|
00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00012 #include <iostream> 00013 00014 #include "zypp/base/Logger.h" 00015 #include "zypp/ws/WebpinResult.h" 00016 00017 using namespace std; 00018 00020 namespace zypp 00021 { 00022 namespace ws 00023 { 00024 00026 // 00027 // CLASS NAME : WebpinResult::Impl 00028 // 00030 struct WebpinResult::Impl 00031 { 00032 Impl() 00033 : priority(0) 00034 {} 00035 00036 ~Impl() 00037 { 00038 //MIL << std::endl; 00039 } 00040 public: 00041 std::string name; 00042 Edition edition; 00043 CheckSum checksum; 00044 Url repourl; 00045 string summary; 00046 string distro; 00047 int priority; 00048 00049 private: 00050 friend Impl * rwcowClone<Impl>( const Impl * rhs ); 00052 Impl * clone() const 00053 { return new Impl( *this ); } 00054 }; 00055 00057 inline std::ostream & operator<<( std::ostream & str, const WebpinResult::Impl & obj ) 00058 { 00059 return str << "WebpinResult::Impl"; 00060 } 00061 00062 WebpinResult::WebpinResult() 00063 : _pimpl( new Impl() ) 00064 {} 00065 00066 WebpinResult::~WebpinResult() 00067 { 00068 //MIL << std::endl; 00069 } 00070 00071 WebpinResult & WebpinResult::setName( const std::string &name ) 00072 { 00073 _pimpl->name = name; 00074 return *this; 00075 } 00076 00077 std::string WebpinResult::name() const 00078 { 00079 return _pimpl->name; 00080 } 00081 00082 00083 zypp::Url WebpinResult::repositoryUrl() const 00084 { 00085 return _pimpl->repourl; 00086 } 00087 00088 WebpinResult & WebpinResult::setRepositoryUrl( const zypp::Url &url ) 00089 { 00090 _pimpl->repourl = url; 00091 return *this; 00092 } 00093 00094 WebpinResult & WebpinResult::setDistribution( const std::string &distro ) 00095 { 00096 _pimpl->distro = distro; 00097 return *this; 00098 } 00099 00100 std::string WebpinResult::distribution() const 00101 { 00102 return _pimpl->distro; 00103 } 00104 00105 WebpinResult & WebpinResult::setSummary( const std::string &summary ) 00106 { 00107 _pimpl->summary = summary; 00108 return *this; 00109 } 00110 00111 std::string WebpinResult::summary() const 00112 { 00113 return _pimpl->summary; 00114 } 00115 00116 WebpinResult & WebpinResult::setPriority( int priority ) 00117 { 00118 _pimpl->priority = priority; 00119 return *this; 00120 } 00121 00122 int WebpinResult::priority() const 00123 { 00124 return _pimpl->priority; 00125 } 00126 00127 00128 WebpinResult & WebpinResult::setEdition( const Edition &edition ) 00129 { 00130 _pimpl->edition = edition; 00131 return *this; 00132 } 00133 00134 Edition WebpinResult::edition() const 00135 { 00136 return _pimpl->edition; 00137 } 00138 00139 WebpinResult & WebpinResult::setChecksum( const CheckSum &checksum ) 00140 { 00141 _pimpl->checksum = checksum; 00142 return *this; 00143 } 00144 00145 CheckSum WebpinResult::checksum() const 00146 { 00147 return _pimpl->checksum; 00148 } 00149 00150 00151 std::ostream & WebpinResult::dumpOn( std::ostream & str ) const 00152 { 00153 str << "- name : " << name() << std::endl; 00154 return str; 00155 } 00156 00157 std::ostream & operator<<( std::ostream & str, const WebpinResult & obj ) 00158 { 00159 return obj.dumpOn(str); 00160 } 00161 00162 } // namespace ws 00163 00165 } // namespace zypp