zypp::CapFactory::Impl Struct Reference

CapFactory implementation. More...

List of all members.

Static Public Member Functions

static void assertResKind (const Resolvable::Kind &refers_r)
 Assert a valid Resolvable::Kind.
static bool isEditionSpec (Rel op_r, const Edition &edition_r)
 Check whether op_r and edition_r make a valid edition spec.
static bool isFileSpec (const std::string &name_r)
 Test for a FileCap.
static bool isSplitSpec (const std::string &name_r)
 Test for a SplitCap.
static bool isHalSpec (const std::string &name_r)
 Test for a HalCap.
static bool isModaliasSpec (const std::string &name_r)
 Test for a ModaliasCap.
static CapabilityImpl::Ptr buildFile (const Resolvable::Kind &refers_r, const std::string &name_r)
static CapabilityImpl::Ptr buildNamed (const Resolvable::Kind &refers_r, const std::string &name_r)
 Try to build a non versioned cap from name_r .
static CapabilityImpl::Ptr buildVersioned (const Resolvable::Kind &refers_r, const std::string &name_r, Rel op_r, const Edition &edition_r)
 Try to build a versioned cap from name_r .
static CapabilityImpl::Ptr buildHal (const Resolvable::Kind &refers_r, const std::string &name_r, Rel op_r=Rel::ANY, const std::string &value_r=std::string())
 Try to build a hal cap from name_r .
static CapabilityImpl::Ptr buildModalias (const Resolvable::Kind &refers_r, const std::string &name_r, Rel op_r=Rel::ANY, const std::string &value_r=std::string())
 Try to build a modalias cap from name_r .


Detailed Description

CapFactory implementation.

Provides various functions doing checks and log and throw. CapFactory::parse usually combines them, and if nothing fails, finaly builds the Capability.

Attention:
Each CapabilityImpl created by CapFactory, must be inserted into _uset, by calling usetInsert, before the Capability is created.

Definition at line 126 of file CapFactory.cc.


Member Function Documentation

static void zypp::CapFactory::Impl::assertResKind const Resolvable::Kind refers_r  )  [inline, static]
 

Assert a valid Resolvable::Kind.

Definition at line 129 of file CapFactory.cc.

References ZYPP_THROW.

static bool zypp::CapFactory::Impl::isEditionSpec Rel  op_r,
const Edition edition_r
[inline, static]
 

Check whether op_r and edition_r make a valid edition spec.

Rel::NONE is not usefull thus forbidden. Rel::ANY can be ignored, so no VersionedCap is needed for this. Everything else requires a VersionedCap.

Returns:
Whether to build a VersionedCap (i.e. op_r is not Rel::ANY.

Definition at line 144 of file CapFactory.cc.

References zypp::Rel::ANY_e, zypp::Rel::EQ_e, zypp::Rel::GE_e, zypp::Rel::GT_e, zypp::Rel::inSwitch(), zypp::Rel::LE_e, zypp::Rel::LT_e, zypp::Rel::NE_e, zypp::Edition::noedition, zypp::Rel::NONE_e, WAR, and ZYPP_THROW.

static bool zypp::CapFactory::Impl::isFileSpec const std::string &  name_r  )  [inline, static]
 

Test for a FileCap.

name_r starts with "/".

Definition at line 174 of file CapFactory.cc.

static bool zypp::CapFactory::Impl::isSplitSpec const std::string &  name_r  )  [inline, static]
 

Test for a SplitCap.

name_r constains ":/".

Definition at line 180 of file CapFactory.cc.

static bool zypp::CapFactory::Impl::isHalSpec const std::string &  name_r  )  [inline, static]
 

Test for a HalCap.

name_r starts with "hal(".

Definition at line 186 of file CapFactory.cc.

static bool zypp::CapFactory::Impl::isModaliasSpec const std::string &  name_r  )  [inline, static]
 

Test for a ModaliasCap.

name_r starts with "modalias(".

Definition at line 192 of file CapFactory.cc.

static CapabilityImpl::Ptr zypp::CapFactory::Impl::buildFile const Resolvable::Kind refers_r,
const std::string &  name_r
[inline, static]
 

Definition at line 197 of file CapFactory.cc.

References zypp::capability::NullCap::instance().

static CapabilityImpl::Ptr zypp::CapFactory::Impl::buildNamed const Resolvable::Kind refers_r,
const std::string &  name_r
[inline, static]
 

Try to build a non versioned cap from name_r .

The CapabilityImpl is built here and inserted into _uset. The final Capability must be created by CapFactory, as it is a friend of Capability. Here we can't access the ctor.

Definition at line 219 of file CapFactory.cc.

References zypp::capability::NullCap::instance().

static CapabilityImpl::Ptr zypp::CapFactory::Impl::buildVersioned const Resolvable::Kind refers_r,
const std::string &  name_r,
Rel  op_r,
const Edition edition_r
[inline, static]
 

Try to build a versioned cap from name_r .

The CapabilityImpl is built here and inserted into _uset. The final Capability must be created by CapFactory, as it is a friend of Capability. Here we can't access the ctor.

Todo:
Quick check for name not being filename or split.

Definition at line 258 of file CapFactory.cc.

References usetInsert().

static CapabilityImpl::Ptr zypp::CapFactory::Impl::buildHal const Resolvable::Kind refers_r,
const std::string &  name_r,
Rel  op_r = Rel::ANY,
const std::string &  value_r = std::string()
[inline, static]
 

Try to build a hal cap from name_r .

The CapabilityImpl is built here and inserted into _uset. The final Capability must be created by CapFactory, as it is a friend of Capability. Here we can't access the ctor.

Todo:
Fix incaccuracy.

Definition at line 285 of file CapFactory.cc.

References zypp::Rel::ANY, zypp::solver::detail::str, usetInsert(), and ZYPP_THROW.

Referenced by zypp::CapFactory::halEvalCap().

static CapabilityImpl::Ptr zypp::CapFactory::Impl::buildModalias const Resolvable::Kind refers_r,
const std::string &  name_r,
Rel  op_r = Rel::ANY,
const std::string &  value_r = std::string()
[inline, static]
 

Try to build a modalias cap from name_r .

The CapabilityImpl is built here and inserted into _uset. The final Capability must be created by CapFactory, as it is a friend of Capability. Here we can't access the ctor.

Todo:
Fix incaccuracy.

Definition at line 319 of file CapFactory.cc.

References zypp::Rel::ANY, zypp::solver::detail::str, usetInsert(), and ZYPP_THROW.

Referenced by zypp::CapFactory::modaliasEvalCap().


The documentation for this struct was generated from the following file:
Generated on Thu Jul 6 00:07:30 2006 for zypp by  doxygen 1.4.6