zypp::capability::FilesystemCap Class Reference

A Capability resolved by a query to /etc/sysconfig/storage:USED_FS_LIST. More...

#include <FilesystemCap.h>

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

List of all members.

Public Types

typedef FilesystemCap Self
typedef FilesystemCap_Ptr Ptr
typedef
FilesystemCap_constPtr 
constPtr

Public Member Functions

 FilesystemCap (const Resolvable::Kind &refers_r, const std::string &name_r)
 Ctor.
virtual const Kindkind () const
 Kind of capability.
virtual CapMatch matches (const CapabilityImpl::constPtr &rhs) const
 Query USED_FS_LIST.
virtual std::string encode () const
 filesystem(name)
virtual std::string index () const
 filesystem()
const std::string & name () const

Static Public Member Functions

static const
SerialNumber
sysconfigStorageSerial ()
 Serial number indicating a change in /etc/sysconfig/storage.

Private Member Functions

bool isEvalCmd () const
 Empty FilesystemCap filesystem().
bool evaluate () const
 Query USED_FS_LIST.

Private Attributes

std::string _name


Detailed Description

A Capability resolved by a query to /etc/sysconfig/storage:USED_FS_LIST.

Note:
FilesystemCap is special as it is self evaluating, and does not comapre to the rhs (or lhs). This is currently solved by treating a FilesystemCap 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 /etc/sysconfig/storage:USED_FS_LIST is returned. Either from lhs or rhs, dependent on which one is the evaluate command.

Definition at line 46 of file FilesystemCap.h.


Member Typedef Documentation

typedef FilesystemCap zypp::capability::FilesystemCap::Self

Reimplemented from zypp::capability::CapabilityImpl.

Definition at line 49 of file FilesystemCap.h.

typedef FilesystemCap_Ptr zypp::capability::FilesystemCap::Ptr

Reimplemented from zypp::capability::CapabilityImpl.

Definition at line 50 of file FilesystemCap.h.

typedef FilesystemCap_constPtr zypp::capability::FilesystemCap::constPtr

Reimplemented from zypp::capability::CapabilityImpl.

Definition at line 51 of file FilesystemCap.h.


Constructor & Destructor Documentation

zypp::capability::FilesystemCap::FilesystemCap ( const Resolvable::Kind refers_r,
const std::string &  name_r 
)

Ctor.

Definition at line 42 of file FilesystemCap.cc.


Member Function Documentation

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

Kind of capability.

Implements zypp::capability::CapabilityImpl.

Definition at line 48 of file FilesystemCap.cc.

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

Query USED_FS_LIST.

Implements zypp::capability::CapabilityImpl.

Definition at line 51 of file FilesystemCap.cc.

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

std::string zypp::capability::FilesystemCap::encode (  )  const [virtual]

filesystem(name)

Implements zypp::capability::CapabilityImpl.

Definition at line 64 of file FilesystemCap.cc.

References _name.

std::string zypp::capability::FilesystemCap::index (  )  const [virtual]

filesystem()

Reimplemented from zypp::capability::CapabilityImpl.

Definition at line 72 of file FilesystemCap.cc.

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

Definition at line 71 of file FilesystemCap.h.

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

Empty FilesystemCap filesystem().

Definition at line 77 of file FilesystemCap.cc.

References _name.

Referenced by matches().

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

Query USED_FS_LIST.

Definition at line 82 of file FilesystemCap.cc.

References _name, zypp::base::sysconfig::read(), zypp::SerialNumberWatcher::remember(), zypp::url::split(), zypp::capability::sysconfigStoragePath(), and sysconfigStorageSerial().

Referenced by matches().

const SerialNumber & zypp::capability::FilesystemCap::sysconfigStorageSerial (  )  [static]

Serial number indicating a change in /etc/sysconfig/storage.

Definition at line 98 of file FilesystemCap.cc.

References zypp::WatchFile::hasChanged(), zypp::WatchFile::NO_INIT, zypp::SerialNumber::setDirty(), and zypp::capability::sysconfigStoragePath().

Referenced by evaluate(), and zypp::pool::PoolImpl::serial().


Member Data Documentation

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

Definition at line 83 of file FilesystemCap.h.

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


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