- added devel configure switch zo disable building zmd (in case you
[platform/upstream/libzypp.git] / zypp / NVRA.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/NVRA.h
10  *
11 */
12 #ifndef ZYPP_NVRA_H
13 #define ZYPP_NVRA_H
14
15 #include <iosfwd>
16
17 #include "zypp/NVR.h"
18 #include "zypp/Arch.h"
19
20 ///////////////////////////////////////////////////////////////////
21 namespace zypp
22 { /////////////////////////////////////////////////////////////////
23
24   ///////////////////////////////////////////////////////////////////
25   //
26   //    CLASS NAME : NVRA
27   //
28   /**  Helper storing Name, Edition and Arch. */
29   struct NVRA : public NVR
30   {
31     /** Default ctor */
32     NVRA()
33     {}
34
35     /** Ctor */
36     explicit
37     NVRA( const std::string & name_r,
38           const Edition & edition_r = Edition(),
39           const Arch & arch_r = Arch() )
40     : NVR( name_r, edition_r )
41     , arch( arch_r )
42     {}
43
44     /** Ctor */
45     explicit
46     NVRA( const NVR & nvr_r,
47           const Arch & arch_r = Arch() )
48     : NVR( nvr_r )
49     , arch( arch_r )
50     {}
51
52     /** Ctor from Resolvable::constPtr */
53     explicit
54     NVRA( ResTraits<Resolvable>::constPtrType res_r );
55
56     /**  */
57     Arch arch;
58   };
59   ///////////////////////////////////////////////////////////////////
60
61   /** \relates NVRA Stream output */
62   std::ostream & operator<<( std::ostream & str, const NVRA & obj );
63
64   /////////////////////////////////////////////////////////////////
65 } // namespace zypp
66 ///////////////////////////////////////////////////////////////////
67 #endif // ZYPP_NVRA_H