added implementation of target classes, which are container for target
[platform/upstream/libzypp.git] / zypp / zypp_detail / ZYppImpl.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/zypp_detail/ZYppImpl.h
10  *
11 */
12 #ifndef ZYPP_ZYPP_DETAIL_ZYPPIMPL_H
13 #define ZYPP_ZYPP_DETAIL_ZYPPIMPL_H
14
15 #include <iosfwd>
16
17 #include "zypp/ResPoolManager.h"
18 #include "zypp/Target.h"
19
20 ///////////////////////////////////////////////////////////////////
21 namespace zypp
22 { /////////////////////////////////////////////////////////////////
23   ///////////////////////////////////////////////////////////////////
24   namespace zypp_detail
25   { /////////////////////////////////////////////////////////////////
26
27     ///////////////////////////////////////////////////////////////////
28     //
29     //  CLASS NAME : ZYppImpl
30     //
31     /** */
32     class ZYppImpl
33     {
34       friend std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj );
35
36     public:
37       /** Default ctor */
38       ZYppImpl();
39       /** Dtor */
40       ~ZYppImpl();
41
42     public:
43       /** */
44       ResPool pool() const
45       { return _pool.accessor(); }
46
47       void addResolvables (const ResStore& store);
48
49       void removeResolvables (const ResStore& store);
50
51       /**
52        * \throws Exception
53        */
54       Target_Ptr target() const;
55   
56       /**
57        * \throws Exception
58        */
59       void initTarget(const Pathname & root);
60   
61       /**
62        * \throws Exception
63        */
64       void finishTarget();
65             
66     private:
67       /** */
68       ResPoolManager _pool;
69       /** */
70       Target_Ptr _target;
71     };
72     ///////////////////////////////////////////////////////////////////
73
74     /** \relates ZYppImpl Stream output */
75     std::ostream & operator<<( std::ostream & str, const ZYppImpl & obj );
76
77     /////////////////////////////////////////////////////////////////
78   } // namespace zypp_detail
79   ///////////////////////////////////////////////////////////////////
80   /////////////////////////////////////////////////////////////////
81 } // namespace zypp
82 ///////////////////////////////////////////////////////////////////
83 #endif // ZYPP_ZYPP_DETAIL_ZYPPIMPL_H