libzypp: zyppng::sat::Capabilities::const_iterator Class Reference

libzypp 17.38.11

zyppng::sat::Capabilities::const_iterator Class Reference

Capabilities iterator. More...

`#include <zypp/ng/sat/capabilities.h>`

## Public Types
using | iterator_category = std::forward_iterator_tag
using | value_type = Capability
using | difference_type = std::ptrdiff_t
using | pointer = void
using | reference = const Capability

## Public Member Functions
| const_iterator ()
| const_iterator (const sat::detail::IdType *idx)
bool | tagged () const
| Return `true` if the Capability is `tagged`.
reference | operator* () const
const_iterator & | operator++ ()
const_iterator | operator++ (int)
bool | operator== (const const_iterator &rhs) const
bool | operator!= (const const_iterator &rhs) const

## Private Attributes
const sat::detail::IdType * | _idx
zypp::DefaultIntegral< bool, false > | _tagged

## Detailed Description

Capabilities iterator.

A forward iterator over a libsolv id array. Automatically skips internal dep-marker ids, setting the tagged flag when it does so to indicate that subsequent capabilities carry a special property (e.g. pre-requires within a solvable's requires list).

Definition at line 97 of file capabilities.h.

## Member Typedef Documentation

## ◆ iterator_category

using zyppng::sat::Capabilities::const_iterator::iterator_category = std::forward_iterator_tag

Definition at line 100 of file capabilities.h.

## ◆ value_type

using zyppng::sat::Capabilities::const_iterator::value_type = Capability

Definition at line 101 of file capabilities.h.

## ◆ difference_type

using zyppng::sat::Capabilities::const_iterator::difference_type = std::ptrdiff_t

Definition at line 102 of file capabilities.h.

## ◆ pointer

using zyppng::sat::Capabilities::const_iterator::pointer = void

Definition at line 103 of file capabilities.h.

## ◆ reference

using zyppng::sat::Capabilities::const_iterator::reference = const Capability

Definition at line 104 of file capabilities.h.

## Constructor & Destructor Documentation

## ◆ const_iterator() [1/2]

zyppng::sat::Capabilities::const_iterator::const_iterator | ( |  | ) |
| inline

Definition at line 106 of file capabilities.h.

## ◆ const_iterator() [2/2]

zyppng::sat::Capabilities::const_iterator::const_iterator | ( | const sat::detail::IdType * | idx | ) |
| inlineexplicit

Definition at line 110 of file capabilities.h.

## Member Function Documentation

## ◆ tagged()

bool zyppng::sat::Capabilities::const_iterator::tagged | ( |  | ) | const
| inline

Return `true` if the Capability is `tagged`.

The meaning of `tagged` depends on the kind of dependency you are processing. It is a hint that the iterator skipped some internal marker, indicating that subsequent capabilities have a special property. Within a Solvable's requirements e.g. the pre-requirements are tagged.

Capabilities req( solvable.dep_requires() );
for ( auto it = req.begin(); it != req.end(); ++it )
{
if ( it.tagged() )
cout << *it << " (is prereq)" << endl;
else
cout << *it << endl;
}
zyppng::sat::Capabilities::Capabilities
Capabilities()
Default ctor.
Definition capabilities.h:42

Definition at line 139 of file capabilities.h.

## ◆ operator*()

reference zyppng::sat::Capabilities::const_iterator::operator* | ( |  | ) | const
| inline

Definition at line 141 of file capabilities.h.

## ◆ operator++() [1/2]

const_iterator & zyppng::sat::Capabilities::const_iterator::operator++ | ( |  | ) |
| inline

Definition at line 144 of file capabilities.h.

## ◆ operator++() [2/2]

const_iterator zyppng::sat::Capabilities::const_iterator::operator++ | ( | int |  | ) |
| inline

Definition at line 155 of file capabilities.h.

## ◆ operator==()

bool zyppng::sat::Capabilities::const_iterator::operator== | ( | const const_iterator & | rhs | ) | const
| inline

Definition at line 162 of file capabilities.h.

## ◆ operator!=()

bool zyppng::sat::Capabilities::const_iterator::operator!= | ( | const const_iterator & | rhs | ) | const
| inline

Definition at line 170 of file capabilities.h.

## Member Data Documentation

## ◆ _idx

const sat::detail::IdType* zyppng::sat::Capabilities::const_iterator::_idx
| private

Definition at line 174 of file capabilities.h.

## ◆ _tagged

zypp::DefaultIntegral<bool,false> zyppng::sat::Capabilities::const_iterator::_tagged
| private

Definition at line 175 of file capabilities.h.

The documentation for this class was generated from the following file:

- zypp/ng/sat/capabilities.h