NamedCap.cc

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #include "zypp/capability/NamedCap.h"
00013 
00014 using namespace std;
00015 
00017 namespace zypp
00018 { 
00019 
00020   namespace capability
00021   { 
00022 
00023     const CapabilityImpl::Kind & NamedCap::kind() const
00024     { return CapTraits<Self>::kind; }
00025 
00026     CapMatch NamedCap::matches( const constPtr & rhs ) const
00027     {
00028       if ( sameKindAndRefers( rhs ) )
00029         {
00030           intrusive_ptr<const Self> namedrhs( asKind<Self>(rhs) );
00031           return(    _name == namedrhs->_name
00032                   && range().overlaps( namedrhs->range() ) );
00033         }
00034       return false;
00035     }
00036 
00037     std::string NamedCap::encode() const
00038     { return _name; }
00039 
00040     const Edition::MatchRange & NamedCap::range() const
00041     {
00042       static Edition::MatchRange _range;
00043       return _range;
00044     }
00045 
00047   } // namespace capability
00050 } // namespace zypp

Generated on Thu Jul 6 00:07:20 2006 for zypp by  doxygen 1.4.6