Enabled use of ResTraits. Currently they define the
[platform/upstream/libzypp.git] / zypp / Patch.cc
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/Patch.cc
10  *
11 */
12 #include "zypp/Patch.h"
13
14 using namespace std;
15
16 ///////////////////////////////////////////////////////////////////
17 namespace zypp
18 { /////////////////////////////////////////////////////////////////
19
20   ///////////////////////////////////////////////////////////////////
21   //
22   //    METHOD NAME : Patch::Patch
23   //    METHOD TYPE : Ctor
24   //
25   Patch::Patch( const std::string & name_r,
26                 const Edition & edition_r,
27                 const Arch & arch_r )
28   : ResObject( ResTraits<Self>::_kind, name_r, edition_r, arch_r )
29   {}
30
31   ///////////////////////////////////////////////////////////////////
32   //
33   //    METHOD NAME : Patch::~Patch
34   //    METHOD TYPE : Dtor
35   //
36   Patch::~Patch()
37   {}
38
39   ///////////////////////////////////////////////////////////////////
40   //
41   //    Patch interface forwarded to implementation
42   //
43   ///////////////////////////////////////////////////////////////////
44
45   std::string Patch::id() const
46   { return pimpl().id(); }
47
48   unsigned int Patch::timestamp() const
49   { return pimpl().timestamp(); }
50
51   std::string Patch::category() const
52   { return pimpl().category(); }
53
54   bool Patch::reboot_needed() const
55   { return pimpl().reboot_needed(); }
56
57   bool Patch::affects_pkg_manager() const
58   { return pimpl().affects_pkg_manager(); }
59
60   Patch::AtomList Patch::atoms()
61   { return pimpl().all_atoms(); }
62
63   bool Patch::interactive()
64   { return pimpl().interactive(); }
65
66   void Patch::mark_atoms_to_freshen(bool freshen)
67   { pimpl().mark_atoms_to_freshen(freshen); }
68
69   bool Patch::any_atom_selected()
70   { return pimpl().any_atom_selected(); }
71
72   void Patch::select()
73   { pimpl().mark_atoms_to_freshen(true); }
74
75   /////////////////////////////////////////////////////////////////
76 } // namespace zypp
77 ///////////////////////////////////////////////////////////////////