Imported Upstream version 14.44.0
[platform/upstream/libzypp.git] / zypp / CapMatch.cc
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/CapMatch.cc
10  *
11 */
12 #include <iostream>
13 //#include "zypp/base/Logger.h"
14
15 #include "zypp/CapMatch.h"
16
17 using std::endl;
18
19 ///////////////////////////////////////////////////////////////////
20 namespace zypp
21 { /////////////////////////////////////////////////////////////////
22
23   const CapMatch CapMatch::yes( true );
24   const CapMatch CapMatch::no( false );
25   const CapMatch CapMatch::irrelevant;
26
27   /******************************************************************
28   **
29   **    FUNCTION NAME : operator<<
30   **    FUNCTION TYPE : std::ostream &
31   */
32   std::ostream & operator<<( std::ostream & str, const CapMatch & obj )
33   {
34     if ( obj._result == CapMatch::IRRELEVANT )
35       return str << "IRRELEVANT";
36     return str << ( obj._result == CapMatch::MATCH ? "MATCH" : "NOMATCH" );
37   }
38
39   /////////////////////////////////////////////////////////////////
40 } // namespace zypp
41 ///////////////////////////////////////////////////////////////////