libzypp 17.37.17
|
Result iterator. More...
#include <zypp/sat/LookupAttr.h>
Public Member Functions | |
Moving fast forward. | |
void | nextSkipSolvAttr () |
On the next call to operator++ advance to the next SolvAttr. | |
void | nextSkipSolvable () |
On the next call to operator++ advance to the next Solvable. | |
void | nextSkipRepo () |
On the next call to operator++ advance to the next Repository. | |
void | skipSolvAttr () |
Immediately advance to the next SolvAttr. | |
void | skipSolvable () |
Immediately advance to the next Solvable. | |
void | skipRepo () |
Immediately advance to the next Repository. | |
void | stayInThisSolvable () |
Stop after all matches in the current Solvable are processed. | |
void | stayInThisRepo () |
Stop after all matches in the current Repository are processed. | |
Current position info. | |
Repository | inRepo () const |
The current Repository. | |
Solvable | inSolvable () const |
The current Solvable. | |
SolvAttr | inSolvAttr () const |
The current SolvAttr. | |
bool | atEnd () const |
Whether this points to the end of a query (Iterator is invalid). | |
Test attribute value type. | |
detail::IdType | solvAttrType () const |
The current SolvAttr type. | |
bool | solvAttrNumeric () const |
Whether this is a numeric attribute (incl. | |
bool | solvAttrString () const |
Whether this is a string attribute. | |
bool | solvAttrIdString () const |
Whether this string attribute is available as IdString. | |
bool | solvAttrCheckSum () const |
Whether this is a CheckSum attribute. | |
bool | solvAttrSubEntry () const |
Whether this is the entry to a sub-structure (flexarray). | |
Iterate sub-structures. | |
These are usable iff solvAttrSubEntry is
// Lookup all "update:reference" entries for a specific solvable
sat::LookupAttr q( sat::SolvAttr::updateReference, p->satSolvable() );
for_( res, q.begin(), q.end() )
{
// List all sub values
for_( sub, res.subBegin(), res.subEnd() )
{
cout << sub.asString() << endl;
}
// Directly access c specific value:
sat::LookupAttr::iterator it( res.subFind( sat::SolvAttr::updateReferenceHref ) );
if ( it != res.subEnd() )
cout << it.asString() << endl;
}
static const SolvAttr updateReferenceHref Definition SolvAttr.h:143 | |
bool | subEmpty () const |
Whether the sub-structure is empty. | |
size_type | subSize () const |
Ammount of attributes in the sub-structure. | |
iterator | subBegin () const |
Iterator to the begin of a sub-structure. | |
iterator | subEnd () const |
Iterator behind the end of a sub-structure. | |
iterator | subFind (const SolvAttr &attr_r) const |
Iterator pointing to the first occurance of SolvAttr attr_r in sub-structure. | |
iterator | subFind (const C_Str &attrname_r) const |
Helpers and forward declarations from LookupAttrTools.h | |
template<> | |
CheckSum | asType () const |
Related Symbols | |
(Note that these are not member symbols.) | |
std::ostream & | operator<< (std::ostream &str, const LookupAttr::iterator &obj) ZYPP_API |
Stream output. | |
template<class TResult, class TAttr> | |
std::ostream & | operator<< (std::ostream &str, const ArrayAttr< TResult, TAttr > &obj) |
Stream output. |
Retrieving attribute values. | |
class | boost::iterator_core_access |
detail::DIWrap | _dip |
int | asInt () const |
Conversion to numeric types. | |
unsigned | asUnsigned () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | asBool () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
unsigned long long | asUnsignedLL () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const char * | c_str () const |
Conversion to string types. | |
std::string | asString () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. If used with non-string types, this method tries to create some appropriate string representation. | |
IdString | idStr () const |
As IdStr. | |
detail::IdType | id () const |
CheckSum | asCheckSum () const |
As CheckSum. | |
template<class Tp> | |
Tp | asType () const |
Templated return type. | |
iterator () | |
iterator (const iterator &rhs) | |
iterator & | operator= (const iterator &rhs) |
~iterator () | |
iterator (detail::DIWrap &dip_r) | |
C-tor taking over ownership of the passed detail::CDataiterator and doing its first iteration (::dataiterator_step) | |
detail::CDataiterator * | get () const |
Expert backdoor. | |
template<class OtherDerived, class OtherIterator, class V, class C, class R, class D> | |
bool | equal (const boost::iterator_adaptor< OtherDerived, OtherIterator, V, C, R, D > &rhs) const |
bool | dip_equal (const detail::CDataiterator &lhs, const detail::CDataiterator &rhs) const |
detail::IdType | dereference () const |
void | increment () |
Result iterator.
Extended iterator methods valid only if not @end.
Definition at line 357 of file LookupAttr.h.
zypp::sat::LookupAttr::iterator::iterator | ( | ) |
Definition at line 719 of file LookupAttr.cc.
zypp::sat::LookupAttr::iterator::iterator | ( | const iterator & | rhs | ) |
Definition at line 723 of file LookupAttr.cc.
zypp::sat::LookupAttr::iterator::~iterator | ( | ) |
Definition at line 738 of file LookupAttr.cc.
zypp::sat::LookupAttr::iterator::iterator | ( | detail::DIWrap & | dip_r | ) |
C-tor taking over ownership of the passed detail::CDataiterator
and doing its first iteration (::dataiterator_step)
Definition at line 730 of file LookupAttr.cc.
void zypp::sat::LookupAttr::iterator::nextSkipSolvAttr | ( | ) |
On the next call to operator++ advance to the next SolvAttr.
Definition at line 361 of file LookupAttr.cc.
void zypp::sat::LookupAttr::iterator::nextSkipSolvable | ( | ) |
On the next call to operator++ advance to the next Solvable.
Definition at line 364 of file LookupAttr.cc.
void zypp::sat::LookupAttr::iterator::nextSkipRepo | ( | ) |
On the next call to operator++ advance to the next Repository.
Definition at line 367 of file LookupAttr.cc.
|
inline |
Immediately advance to the next SolvAttr.
Definition at line 378 of file LookupAttr.h.
|
inline |
Immediately advance to the next Solvable.
Definition at line 382 of file LookupAttr.h.
|
inline |
Immediately advance to the next Repository.
Definition at line 386 of file LookupAttr.h.
void zypp::sat::LookupAttr::iterator::stayInThisSolvable | ( | ) |
Stop after all matches in the current Solvable are processed.
Definition at line 370 of file LookupAttr.cc.
void zypp::sat::LookupAttr::iterator::stayInThisRepo | ( | ) |
Stop after all matches in the current Repository are processed.
Definition at line 373 of file LookupAttr.cc.
Repository zypp::sat::LookupAttr::iterator::inRepo | ( | ) | const |
The current Repository.
Definition at line 352 of file LookupAttr.cc.
Solvable zypp::sat::LookupAttr::iterator::inSolvable | ( | ) | const |
The current Solvable.
Definition at line 355 of file LookupAttr.cc.
SolvAttr zypp::sat::LookupAttr::iterator::inSolvAttr | ( | ) | const |
The current SolvAttr.
Definition at line 358 of file LookupAttr.cc.
|
inline |
Whether this points to the end of a query (Iterator is invalid).
Definition at line 408 of file LookupAttr.h.
detail::IdType zypp::sat::LookupAttr::iterator::solvAttrType | ( | ) | const |
The current SolvAttr type.
Definition at line 380 of file LookupAttr.cc.
bool zypp::sat::LookupAttr::iterator::solvAttrNumeric | ( | ) | const |
bool zypp::sat::LookupAttr::iterator::solvAttrString | ( | ) | const |
Whether this is a string attribute.
Definition at line 395 of file LookupAttr.cc.
bool zypp::sat::LookupAttr::iterator::solvAttrIdString | ( | ) | const |
Whether this string attribute is available as IdString.
Definition at line 410 of file LookupAttr.cc.
bool zypp::sat::LookupAttr::iterator::solvAttrCheckSum | ( | ) | const |
Whether this is a CheckSum attribute.
Definition at line 423 of file LookupAttr.cc.
bool zypp::sat::LookupAttr::iterator::solvAttrSubEntry | ( | ) | const |
Whether this is the entry to a sub-structure (flexarray).
This is the entry to a sequence of attributes. To acces them use subBegin and subEnd.
Definition at line 453 of file LookupAttr.cc.
bool zypp::sat::LookupAttr::iterator::subEmpty | ( | ) | const |
Whether the sub-structure is empty.
Definition at line 460 of file LookupAttr.cc.
LookupAttr::size_type zypp::sat::LookupAttr::iterator::subSize | ( | ) | const |
Ammount of attributes in the sub-structure.
Definition at line 463 of file LookupAttr.cc.
LookupAttr::iterator zypp::sat::LookupAttr::iterator::subBegin | ( | ) | const |
Iterator to the begin of a sub-structure.
Definition at line 471 of file LookupAttr.cc.
LookupAttr::iterator zypp::sat::LookupAttr::iterator::subEnd | ( | ) | const |
Iterator behind the end of a sub-structure.
Definition at line 493 of file LookupAttr.cc.
LookupAttr::iterator zypp::sat::LookupAttr::iterator::subFind | ( | const SolvAttr & | attr_r | ) | const |
Iterator pointing to the first occurance of SolvAttr attr_r in sub-structure.
If sat::SolvAttr::allAttr is passed, subBegin is returned.
Definition at line 498 of file LookupAttr.cc.
LookupAttr::iterator zypp::sat::LookupAttr::iterator::subFind | ( | const C_Str & | attrname_r | ) | const |
Definition at line 509 of file LookupAttr.cc.
int zypp::sat::LookupAttr::iterator::asInt | ( | ) | const |
Conversion to numeric types.
Definition at line 544 of file LookupAttr.cc.
unsigned zypp::sat::LookupAttr::iterator::asUnsigned | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 559 of file LookupAttr.cc.
bool zypp::sat::LookupAttr::iterator::asBool | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 577 of file LookupAttr.cc.
unsigned long long zypp::sat::LookupAttr::iterator::asUnsignedLL | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 562 of file LookupAttr.cc.
const char * zypp::sat::LookupAttr::iterator::c_str | ( | ) | const |
Conversion to string types.
Definition at line 581 of file LookupAttr.cc.
std::string zypp::sat::LookupAttr::iterator::asString | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. If used with non-string types, this method tries to create some appropriate string representation.
Definition at line 611 of file LookupAttr.cc.
IdString zypp::sat::LookupAttr::iterator::idStr | ( | ) | const |
As IdStr.
This is only done for poolized string types. Large strings like summary or descriptions are not available via IdStr, only via c_str and asString.
Definition at line 665 of file LookupAttr.cc.
|
inline |
Definition at line 523 of file LookupAttr.h.
CheckSum zypp::sat::LookupAttr::iterator::asCheckSum | ( | ) | const |
As CheckSum.
Definition at line 681 of file LookupAttr.cc.
|
inline |
Templated return type.
Per default assumes an Id based type, so try to construct it from the Id.
Should be specialized for supported types above.
Definition at line 535 of file LookupAttr.h.
LookupAttr::iterator & zypp::sat::LookupAttr::iterator::operator= | ( | const iterator & | rhs | ) |
Definition at line 741 of file LookupAttr.cc.
|
inlineprivate |
Definition at line 561 of file LookupAttr.h.
|
private |
Definition at line 753 of file LookupAttr.cc.
|
private |
Definition at line 760 of file LookupAttr.cc.
|
private |
Definition at line 766 of file LookupAttr.cc.
|
inline |
Expert backdoor.
Definition at line 575 of file LookupAttr.h.
Definition at line 798 of file LookupAttr.cc.
|
friend |
Definition at line 558 of file LookupAttr.h.
|
Stream output.
Definition at line 782 of file LookupAttr.cc.
|
Stream output.
Definition at line 216 of file LookupAttrTools.h.
|
private |
Definition at line 578 of file LookupAttr.h.