ignore
[platform/upstream/libzypp.git] / zypp / NVR.cc
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/NVR.cc
10  *
11 */
12 #include <iostream>
13
14 #include "zypp/NVR.h"
15 #include "zypp/Resolvable.h"
16
17 ///////////////////////////////////////////////////////////////////
18 namespace zypp
19 { /////////////////////////////////////////////////////////////////
20
21   NVR::NVR( Resolvable::constPtr res_r )
22   {
23     if ( res_r )
24       {
25         *this = NVR( res_r->name(), res_r->edition() );
26       }
27   }
28
29   /******************************************************************
30   **
31   **    FUNCTION NAME : operator<<
32   **    FUNCTION TYPE : std::ostream &
33   */
34   std::ostream & operator<<( std::ostream & str, const NVR & obj )
35   {
36     return str << obj.name << '-' << obj.edition;
37   }
38
39   /////////////////////////////////////////////////////////////////
40 } // namespace zypp
41 ///////////////////////////////////////////////////////////////////