e0d16aac03e8d5ff309e2af464052fc9fbf48525
[platform/upstream/libzypp.git] / zypp2 / RepoStatus.cc
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp2/RepoStatus.cc
10  *
11 */
12 #include <iostream>
13 //#include "zypp/base/Logger.h"
14 #include "zypp2/RepoStatus.h"
15
16 using std::endl;
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21
22   ///////////////////////////////////////////////////////////////////
23   //
24   //    CLASS NAME : RepoStatus::Impl
25   //
26   /** RepoStatus implementation. */
27   struct RepoStatus::Impl
28   {
29
30   public:
31     /** Offer default Impl. */
32     static shared_ptr<Impl> nullimpl()
33     {
34       static shared_ptr<Impl> _nullimpl( new Impl );
35       return _nullimpl;
36     }
37
38   private:
39     friend Impl * rwcowClone<Impl>( const Impl * rhs );
40     /** clone for RWCOW_pointer */
41     Impl * clone() const
42     { return new Impl( *this ); }
43   };
44   ///////////////////////////////////////////////////////////////////
45
46   /** \relates RepoStatus::Impl Stream output */
47   inline std::ostream & operator<<( std::ostream & str, const RepoStatus::Impl & obj )
48   {
49     return str << "RepoStatus::Impl";
50   }
51
52   ///////////////////////////////////////////////////////////////////
53   //
54   //    CLASS NAME : RepoStatus
55   //
56   ///////////////////////////////////////////////////////////////////
57
58   ///////////////////////////////////////////////////////////////////
59   //
60   //    METHOD NAME : RepoStatus::RepoStatus
61   //    METHOD TYPE : Ctor
62   //
63   RepoStatus::RepoStatus()
64   : _pimpl( Impl::nullimpl() )
65   {}
66
67   ///////////////////////////////////////////////////////////////////
68   //
69   //    METHOD NAME : RepoStatus::~RepoStatus
70   //    METHOD TYPE : Dtor
71   //
72   RepoStatus::~RepoStatus()
73   {}
74
75   /******************************************************************
76   **
77   **    FUNCTION NAME : operator<<
78   **    FUNCTION TYPE : std::ostream &
79   */
80   std::ostream & operator<<( std::ostream & str, const RepoStatus & obj )
81   {
82     return str << *obj._pimpl;
83   }
84
85   /////////////////////////////////////////////////////////////////
86 } // namespace zypp2
87 ///////////////////////////////////////////////////////////////////