libzypp  11.13.5
WebpinResult.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #include <iostream>
13 
14 #include "zypp/base/Logger.h"
15 #include "zypp/ws/WebpinResult.h"
16 
17 using namespace std;
18 
20 namespace zypp
21 {
22 namespace ws
23 {
24 
26  //
27  // CLASS NAME : WebpinResult::Impl
28  //
31  {
32  Impl()
33  : priority(0)
34  {}
35 
36  ~Impl()
37  {
38  //MIL << std::endl;
39  }
40  public:
41  std::string name;
45  string summary;
46  string distro;
47  int priority;
48 
49  private:
50  friend Impl * rwcowClone<Impl>( const Impl * rhs );
52  Impl * clone() const
53  { return new Impl( *this ); }
54  };
55 
57  inline std::ostream & operator<<( std::ostream & str, const WebpinResult::Impl & obj )
58  {
59  return str << "WebpinResult::Impl";
60  }
61 
62  WebpinResult::WebpinResult()
63  : _pimpl( new Impl() )
64  {}
65 
67  {
68  //MIL << std::endl;
69  }
70 
71  WebpinResult & WebpinResult::setName( const std::string &name )
72  {
73  _pimpl->name = name;
74  return *this;
75  }
76 
77  std::string WebpinResult::name() const
78  {
79  return _pimpl->name;
80  }
81 
82 
84  {
85  return _pimpl->repourl;
86  }
87 
89  {
90  _pimpl->repourl = url;
91  return *this;
92  }
93 
94  WebpinResult & WebpinResult::setDistribution( const std::string &distro )
95  {
96  _pimpl->distro = distro;
97  return *this;
98  }
99 
100  std::string WebpinResult::distribution() const
101  {
102  return _pimpl->distro;
103  }
104 
105  WebpinResult & WebpinResult::setSummary( const std::string &summary )
106  {
108  return *this;
109  }
110 
111  std::string WebpinResult::summary() const
112  {
113  return _pimpl->summary;
114  }
115 
117  {
119  return *this;
120  }
121 
123  {
124  return _pimpl->priority;
125  }
126 
127 
129  {
131  return *this;
132  }
133 
135  {
136  return _pimpl->edition;
137  }
138 
140  {
142  return *this;
143  }
144 
146  {
147  return _pimpl->checksum;
148  }
149 
150 
151  std::ostream & WebpinResult::dumpOn( std::ostream & str ) const
152  {
153  str << "- name : " << name() << std::endl;
154  return str;
155  }
156 
157  std::ostream & operator<<( std::ostream & str, const WebpinResult & obj )
158  {
159  return obj.dumpOn(str);
160  }
161 
162 } // namespace ws
163 
165 } // namespace zypp