12 #ifndef ZYPP_SAT_LOOKUPATTR_H
13 #define ZYPP_SAT_LOOKUPATTR_H
147 iterator
begin()
const;
150 iterator
end()
const;
300 const std::string & mstring_r = std::string(),
int flags_r = 0 );
303 const char * mstring_r,
int flags_r = 0 );
318 DIWrap( rhs ).swap( *
this );
322 {
DIWrap().swap( *
this ); }
351 , detail::CDataiterator *
353 , boost::forward_traversal_tag
501 const char *
c_str()
const;
527 template<
class _Tp> _Tp
asType()
const {
return _Tp(
id()); }
552 template <
class OtherDerived,
class OtherIterator,
class V,
class C,
class R,
class D>
553 bool equal(
const boost::iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> & rhs )
const
555 return (
bool(base()) ==
bool(rhs.base()) )
556 && ( ! base() ||
dip_equal( *base(), *rhs.base() ) );
581 template<>
inline int LookupAttr::iterator::asType<int>()
const {
return asInt(); }
582 template<>
inline unsigned LookupAttr::iterator::asType<unsigned>()
const {
return asUnsigned(); }
583 template<>
inline unsigned long long LookupAttr::iterator::asType<unsigned long long>()
const {
return asUnsignedLL(); }
584 template<>
inline bool LookupAttr::iterator::asType<bool>()
const {
return asBool(); }
585 template<>
inline const char * LookupAttr::iterator::asType<const char *>()
const {
return c_str(); }
586 template<>
inline std::string LookupAttr::iterator::asType<std::string>()
const {
return asString(); }
587 template<>
inline IdString LookupAttr::iterator::asType<IdString>()
const {
return idStr(); }
588 template<>
CheckSum LookupAttr::iterator::asType<CheckSum>()
const;
590 template<
class _ResultT,
class _AttrT>
606 {
return str << &obj; }
608 #endif // ZYPP_SAT_LOOKUPATTR_H
void stayInThisRepo()
Stop after all matches in the current Repository are processed.
DIWrap()
NULL detail::CDataiterator
void skipSolvAttr()
Immediately advance to the next SolvAttr.
int IdType
Generic Id type.
A Solvable object within the sat Pool.
void setPool(Location=SOLV_ATTR)
Set search in Pool (all repositories).
::_Dataiterator CDataiterator
Wrapped libsolv C data type exposed as backdoor.
void setAttr(SolvAttr attr_r)
Set the SolvAttr to search.
bool atEnd() const
Whether this points to the end of a query (Iterator is invalid).
IdType id() const
Expert backdoor.
String matching (STRING|SUBSTRING|GLOB|REGEX).
Lightweight attribute value lookup.
void resetStrMatcher()
Reset the pattern to match.
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
void setParent(SolvAttr attr_r)
Set search within a sub-structure (SolvAttr::noAttr for none)
void setSolvable(Solvable solv_r)
Set search in one Solvable.
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
void nextSkipSolvAttr()
On the next call to operator++ advance to the next SolvAttr.
CRepo * RepoIdType
Id type to connect Repo and sat-repo.
bool solvAttrIdString() const
Whether this string attribute is available as IdString.
Access to the sat-pools string space.
RWCOW_pointer< Impl > _pimpl
unsigned asUnsigned() const
Search for solvable attributes (default)
LookupAttr::transformIterator based container to retrieve list attributes.
Exceptions thrown from attribute matching.
void skipRepo()
Immediately advance to the next Repository.
LookupAttr()
Default ctor finds nothing.
LookupAttr implememtation.
_Tp asType() const
Templated return type.
SolvAttr parent() const
Whether to search within a sub-structure (SolvAttr::noAttr if not)
void skipSolvable()
Immediately advance to the next Solvable.
const std::string & getstr() const
bool dip_equal(const detail::CDataiterator &lhs, const detail::CDataiterator &rhs) const
iterator subBegin() const
Iterator to the begin of a sub-structure.
void setRepo(Repository repo_r)
Set search in one Repository.
iterator & operator=(const iterator &rhs)
DIWrap & operator=(const DIWrap &rhs)
bool pool() const
Whether to search in Pool.
iterator end() const
Iterator behind the end of query results.
void setRepo(Repository repo_r, Location=SOLV_ATTR)
Set search in one Repository.
Lightweight repository attribute value lookup.
Convenience char* constructible from std::string and char*, it maps (char*)0 to an empty string...
SolvAttr attr() const
The SolvAttr to search.
Solvable inSolvable() const
The current Solvable.
std::ostream & operator<<(std::ostream &str, const Arch::CompatEntry &obj)
CheckSum asCheckSum() const
As CheckSum.
LookupRepoAttr(SolvAttr attr_r)
Wrapper around sat detail::CDataiterator.
SolvAttr inSolvAttr() const
The current SolvAttr.
void stayInThisSolvable()
Stop after all matches in the current Solvable are processed.
detail::IdType dereference() const
void setStrMatcher(const StrMatcher &matcher_r)
Set the pattern to match.
void nextSkipSolvable()
On the next call to operator++ advance to the next Solvable.
std::ostream & operator<<(std::ostream &str, const DIWrap &obj)
const StrMatcher & strMatcher() const
The pattern to match.
std::ostream & dumpOn(std::ostream &str, const LocaleSupport &obj)
detail::CDataiterator * operator->() const
bool solvAttrString() const
Whether this is a string attribute.
LookupRepoAttr()
Default ctor finds nothing.
bool empty() const
Whether the query is empty.
std::string asString(const Patch::SeverityFlag &obj)
Repository inRepo() const
The current Repository.
void setPool()
Set search in Pool (all repositories).
detail::IdType id() const
const char * c_str() const
Conversion to string types.
size_type size() const
Ammount of results.
detail::CDataiterator * get() const
bool equal(const boost::iterator_adaptor< OtherDerived, OtherIterator, V, C, R, D > &rhs) const
void nextSkipRepo()
On the next call to operator++ advance to the next Repository.
Solvable solvable() const
Whether to search in one Solvable.
detail::CDataiterator * _dip
unsigned long long asUnsignedLL() const
friend class boost::iterator_core_access
bool solvAttrSubEntry() const
Whether this is the entry to a sub-structure (flexarray).
bool solvAttrCheckSum() const
Whether this is a CheckSum attribute.
size_type subSize() const
Ammount of attributes in the sub-structure.
bool subEmpty() const
Whether the sub-structure is empty.
bool solvAttrNumeric() const
Whether this is a numeric attribute (incl.
detail::IdType solvAttrType() const
The current SolvAttr type.
IdString idStr() const
As IdStr.
std::string asString() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
iterator subEnd() const
Iterator behind the end of a sub-structure.
Repository repo() const
Whether to search in one Repository.
Location
Specify the where to look for the attribule.
int asInt() const
Conversion to numeric types.
iterator subFind(SolvAttr attr_r) const
Iterator pointing to the first occurance of SolvAttr attr_r in sub-structure.
iterator begin() const
Iterator to the begin of query results.
Search for repository attributes.