zypp::capability::HalCap Class Reference

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

#include <HalCap.h>

Inheritance diagram for zypp::capability::HalCap:
[legend]

List of all members.

Public Types

typedef HalCap Self
typedef HalCap_Ptr Ptr
typedef HalCap_constPtr constPtr

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 capability.
virtual CapMatch matches (const CapabilityImpl::constPtr &rhs) const
 Query target::Hal.
virtual std::string encode () const
 hal(name) [op value]
virtual std::string index () const
 hal(name)
const std::string & name () const
Rel op () const
const std::string & value () const

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 43 of file HalCap.h.


Member Typedef Documentation

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

Reimplemented from zypp::capability::CapabilityImpl.

Definition at line 46 of file HalCap.h.

typedef HalCap_Ptr zypp::capability::HalCap::Ptr

Reimplemented from zypp::capability::CapabilityImpl.

Definition at line 47 of file HalCap.h.

typedef HalCap_constPtr zypp::capability::HalCap::constPtr

Reimplemented from zypp::capability::CapabilityImpl.

Definition at line 48 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 52 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 58 of file HalCap.h.


Member Function Documentation

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

Kind of capability.

Implements zypp::capability::CapabilityImpl.

Definition at line 26 of file HalCap.cc.

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

Query target::Hal.

Implements zypp::capability::CapabilityImpl.

Definition at line 29 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 42 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 57 of file HalCap.cc.

const std::string& zypp::capability::HalCap::name (  )  const [inline]

Definition at line 82 of file HalCap.h.

Rel zypp::capability::HalCap::op (  )  const [inline]

Definition at line 85 of file HalCap.h.

const std::string& zypp::capability::HalCap::value (  )  const [inline]

Definition at line 88 of file HalCap.h.

References _value.

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

Empty HalCap hal().

Definition at line 62 of file HalCap.cc.

References _name.

Referenced by matches().

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

Query target::Hal.

Definition at line 65 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 100 of file HalCap.h.

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

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

Definition at line 101 of file HalCap.h.

Referenced by encode(), and evaluate().

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

Definition at line 102 of file HalCap.h.

Referenced by encode(), and evaluate().


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 19:23:18 2007 for libzypp by  doxygen 1.5.3