removed void warning
[platform/upstream/libzypp.git] / zypp / zypp_detail / ZYppImpl.cc
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/zypp_detail/ZYppImpl.cc
10  *
11 */
12 #include <iostream>
13 //#include "zypp/base/Logger.h"
14
15 #include "zypp/zypp_detail/ZYppImpl.h"
16
17 using std::endl;
18
19 ///////////////////////////////////////////////////////////////////
20 namespace zypp
21 { /////////////////////////////////////////////////////////////////
22   ///////////////////////////////////////////////////////////////////
23   namespace zypp_detail
24   { /////////////////////////////////////////////////////////////////
25
26     ///////////////////////////////////////////////////////////////////
27     //
28     //  METHOD NAME : ZYppImpl::ZYppImpl
29     //  METHOD TYPE : Constructor
30     //
31     ZYppImpl::ZYppImpl()
32     : _pool()
33     , _sourceFeed( _pool )
34     {
35     }
36
37     ///////////////////////////////////////////////////////////////////
38     //
39     //  METHOD NAME : ZYppImpl::~ZYppImpl
40     //  METHOD TYPE : Destructor
41     //
42     ZYppImpl::~ZYppImpl()
43     {
44     }
45
46     void ZYppImpl::addResolvables (const ResStore& store, bool installed)
47     {
48         _pool.insert(store.begin(), store.end(), installed);
49     }
50
51     void ZYppImpl::removeResolvables (const ResStore& store)
52     {
53         for (ResStore::iterator it = store.begin(); it != store.end(); it++)
54         {
55             _pool.erase(*it);
56         }
57     }
58
59     Target_Ptr ZYppImpl::target() const
60     {
61       if (! _target)
62         ZYPP_THROW(Exception("Target not initialized."));
63       return _target;
64      }
65
66     void ZYppImpl::initTarget(const Pathname & root)
67     {
68        if (_target)
69          _target = Target_Ptr();
70        _target = new Target(root);
71      }
72
73     void ZYppImpl::finishTarget()
74     {
75       _target = 0;
76     }
77
78     /******************************************************************
79      **
80      ** FUNCTION NAME : operator<<
81      ** FUNCTION TYPE : std::ostream &
82     */
83     std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj )
84     {
85       return str << "ZYppImpl";
86     }
87
88     /////////////////////////////////////////////////////////////////
89   } // namespace zypp_detail
90   ///////////////////////////////////////////////////////////////////
91   /////////////////////////////////////////////////////////////////
92 } // namespace zypp
93 ///////////////////////////////////////////////////////////////////