ignore
[platform/upstream/libzypp.git] / zypp / NVRAD.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/NVRAD.h
10  *
11 */
12 #ifndef ZYPP_NVRAD_H
13 #define ZYPP_NVRAD_H
14
15 #include "zypp/NVRA.h"
16 #include "zypp/Dependencies.h"
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21
22   ///////////////////////////////////////////////////////////////////
23   //
24   //    CLASS NAME : NVRAD
25   //
26   /**  Helper storing Name, Edition, Arch and Dependencies.
27    *
28    * \note Stream output and comaprison operators based on
29    * \ref NVRA.
30   */
31   struct NVRAD : public NVRA, public Dependencies
32   {
33     /** Default ctor */
34     NVRAD()
35     {}
36
37     /** Ctor */
38     explicit
39     NVRAD( const std::string & name_r,
40            const Edition & edition_r = Edition(),
41            const Arch & arch_r = Arch(),
42            const Dependencies & deps_r = Dependencies() )
43     : NVRA( name_r, edition_r, arch_r )
44     , Dependencies( deps_r )
45     {}
46
47     /** Ctor */
48     explicit
49     NVRAD( const NVRA & nvra_r,
50            const Dependencies & deps_r = Dependencies() )
51     : NVRA( nvra_r )
52     , Dependencies( deps_r )
53     {}
54
55     /** Ctor from Resolvable::constPtr */
56     explicit
57     NVRAD( const NVR & nvr_r,
58            const Arch & arch_r = Arch(),
59            const Dependencies & deps_r = Dependencies() )
60     : NVRA( nvr_r, arch_r )
61     , Dependencies( deps_r )
62     {}
63
64     /** Ctor */
65     explicit
66     NVRAD( Resolvable::constPtr res_r );
67   };
68   ///////////////////////////////////////////////////////////////////
69
70   /** \relates NVRAD Stream output */
71   std::ostream & operator<<( std::ostream & str, const NVRAD & obj );
72   
73   /////////////////////////////////////////////////////////////////
74 } // namespace zypp
75 ///////////////////////////////////////////////////////////////////
76 #endif // ZYPP_NVRAD_H