zypp::capability::HalCap Class Reference

A Capability resolved by a query to target::hal. More...

#include <HalCap.h>

Inheritance diagram for zypp::capability::HalCap:

zypp::capability::CapabilityImpl zypp::base::ReferenceCounted NonCopyable List of all members.

Public Types

typedef HalCap Self

Public Member Functions

 HalCap (const Resolvable::Kind &refers_r, const std::string &name_r)
 Ctor.
 HalCap (const Resolvable::Kind &refers_r, const std::string &name_r, Rel op_r, const std::string &value_r)
 Ctor.
virtual const Kindkind () const
 Kind of capabiliy.
virtual CapMatch matches (const constPtr &rhs) const
 Query target::Hal.
virtual std::string encode () const
 hal(name) [op value]
virtual std::string index () const
 hal(name)

Private Member Functions

bool isEvalCmd () const
 Empty HalCap hal().
bool evaluate () const
 Query target::Hal.

Private Attributes

std::string _name
Rel _op
std::string _value

Detailed Description

A Capability resolved by a query to target::hal.

Note:
HalCap is special as it is self evaluating, and does not comapre to the rhs (or lhs). This is currently solved by treating a HalCap with an empty name as evaluate command.
matches returns CapMatch::irrelevant, if either both sides are evaluate commands, or both are not.

Otherwise the result of the query to target::hal is returned. Either from lhs or rhs, dependent on which one is the evaluate command.

Definition at line 41 of file HalCap.h.


Member Typedef Documentation

typedef HalCap zypp::capability::HalCap::Self
 

Reimplemented from zypp::capability::CapabilityImpl.

Definition at line 44 of file HalCap.h.


Constructor & Destructor Documentation

zypp::capability::HalCap::HalCap const Resolvable::Kind refers_r,
const std::string &  name_r
[inline]
 

Ctor.

Definition at line 48 of file HalCap.h.

zypp::capability::HalCap::HalCap const Resolvable::Kind refers_r,
const std::string &  name_r,
Rel  op_r,
const std::string &  value_r
[inline]
 

Ctor.

Definition at line 54 of file HalCap.h.


Member Function Documentation

const CapabilityImpl::Kind & zypp::capability::HalCap::kind  )  const [virtual]
 

Kind of capabiliy.

Implements zypp::capability::CapabilityImpl.

Definition at line 24 of file HalCap.cc.

CapMatch zypp::capability::HalCap::matches const constPtr rhs  )  const [virtual]
 

Query target::Hal.

Definition at line 27 of file HalCap.cc.

References evaluate(), zypp::CapMatch::irrelevant, isEvalCmd(), and zypp::capability::CapabilityImpl::sameKindAndRefers().

std::string zypp::capability::HalCap::encode  )  const [virtual]
 

hal(name) [op value]

Implements zypp::capability::CapabilityImpl.

Definition at line 40 of file HalCap.cc.

References _name, _op, _value, zypp::Rel::ANY, and zypp::Rel::asString().

std::string zypp::capability::HalCap::index  )  const [virtual]
 

hal(name)

Reimplemented from zypp::capability::CapabilityImpl.

Definition at line 55 of file HalCap.cc.

bool zypp::capability::HalCap::isEvalCmd  )  const [private]
 

Empty HalCap hal().

Definition at line 60 of file HalCap.cc.

References _name.

Referenced by matches().

bool zypp::capability::HalCap::evaluate  )  const [private]
 

Query target::Hal.

Definition at line 63 of file HalCap.cc.

References _name, _op, _value, and zypp::target::hal::Hal::instance().

Referenced by matches().


Member Data Documentation

std::string zypp::capability::HalCap::_name [private]
 

Definition at line 86 of file HalCap.h.

Referenced by encode(), evaluate(), and isEvalCmd().

Rel zypp::capability::HalCap::_op [private]
 

Definition at line 87 of file HalCap.h.

Referenced by encode(), and evaluate().

std::string zypp::capability::HalCap::_value [private]
 

Definition at line 88 of file HalCap.h.

Referenced by encode(), and evaluate().


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 00:07:31 2006 for zypp by  doxygen 1.4.6