f84b9a3ec39544a4308a50ce4f787861c83113da
[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 #include <string>
17
18 #include "zypp/base/PtrTypes.h"
19 #include "zypp/Edition.h"
20 #include "zypp/Arch.h"
21
22 ///////////////////////////////////////////////////////////////////
23 namespace zypp
24 { /////////////////////////////////////////////////////////////////
25
26   ///////////////////////////////////////////////////////////////////
27   //
28   //    CLASS NAME : NVRA
29   //
30   /** */
31   struct NVRA
32   {
33     /** Default ctor */
34     NVRA()
35     {}
36
37     /** Ctor */
38     explicit
39     NVRA( const std::string & name_r,
40           const Edition & edition_r = Edition(),
41           const Arch & arch_r = Arch() )
42     : name( name_r )
43     , edition( edition_r )
44     , arch( arch_r )
45     {}
46
47     /**  */
48     std::string name;
49     /**  */
50     Edition edition;
51     /**  */
52     Arch arch;
53   };
54   ///////////////////////////////////////////////////////////////////
55
56   /** \relates NVRA Stream output */
57   std::ostream & operator<<( std::ostream & str, const NVRA & obj );
58
59   /////////////////////////////////////////////////////////////////
60 } // namespace zypp
61 ///////////////////////////////////////////////////////////////////
62 #endif // ZYPP_NVRA_H