7ad2708013aca7f25ec3aa9f68af5123fad4d18d
[platform/upstream/libzypp.git] / zypp / detail / ResolvableImpl.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/detail/ResolvableImpl.h
10  *
11 */
12 #ifndef ZYPP_DETAIL_RESOLVABLEIMPL_H
13 #define ZYPP_DETAIL_RESOLVABLEIMPL_H
14
15 #include "zypp/Resolvable.h"
16
17 ///////////////////////////////////////////////////////////////////
18 namespace zypp
19 { /////////////////////////////////////////////////////////////////
20
21   ///////////////////////////////////////////////////////////////////
22   //
23   //    CLASS NAME : Resolvable::Impl
24   //
25   /** Implementation of Resovable
26    * \todo Assert \c deps provide 'name=edition'.
27   */
28   struct Resolvable::Impl
29   {
30     /** Ctor */
31     Impl( const Kind & kind_r,
32           const std::string & name_r,
33           const Edition & edition_r,
34           const Arch & arch_r )
35     : _kind( kind_r )
36     , _name( name_r )
37     , _edition( edition_r )
38     , _arch( arch_r )
39     {}
40
41   public:
42     /**  */
43     const Kind & kind() const
44     { return _kind; }
45       
46     /**  */
47     const std::string & name() const
48     { return _name; }
49       
50     /**  */
51     const Edition & edition() const
52     { return _edition; }
53
54     const Arch & arch() const
55     { return _arch; }
56       
57     /**  */
58     const Dependencies & deps() const
59     { return _deps; }
60
61     /** Set Dependencies.
62      * \todo Check whether we can allow changes after final construction
63     */
64     void setDeps( const Dependencies & val_r )
65     { _deps = val_r; }
66
67       
68
69   private:
70     /**  */
71     Kind _kind;
72     /**  */
73     std::string _name;
74     /**  */
75     Edition _edition;
76     /**  */
77     Arch _arch;
78     /**  */
79     Dependencies _deps;
80   };
81   ///////////////////////////////////////////////////////////////////
82
83   /////////////////////////////////////////////////////////////////
84 } // namespace zypp
85 ///////////////////////////////////////////////////////////////////
86 #endif // ZYPP_DETAIL_RESOLVABLEIMPL_H