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