Go to the documentation of this file.
12 #ifndef ZYPP_SAT_LOOKUPATTR_H
13 #define ZYPP_SAT_LOOKUPATTR_H
29 struct MatchException;
147 iterator
begin()
const;
150 iterator
end()
const;
161 template<
class TResult,
class TAttr = TResult>
162 class TransformIterator;
301 const std::string & mstring_r = std::string(),
int flags_r = 0 );
304 const char * mstring_r,
int flags_r = 0 );
319 DIWrap( rhs ).swap( *
this );
323 {
DIWrap().swap( *
this ); }
352 , detail::CDataiterator *
354 , boost::forward_traversal_tag
502 const char *
c_str()
const;
528 template<
class Tp> Tp
asType()
const {
return Tp(
id()); }
553 template <
class OtherDerived,
class OtherIterator,
class V,
class C,
class R,
class D>
554 bool equal(
const boost::iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> & rhs )
const
556 return (
bool(base()) ==
bool(rhs.base()) )
557 && ( ! base() ||
dip_equal( *base(), *rhs.base() ) );
582 template<>
inline int LookupAttr::iterator::asType<int>()
const {
return asInt(); }
583 template<>
inline unsigned LookupAttr::iterator::asType<unsigned>()
const {
return asUnsigned(); }
584 template<>
inline unsigned long long LookupAttr::iterator::asType<unsigned long long>()
const {
return asUnsignedLL(); }
585 template<>
inline bool LookupAttr::iterator::asType<bool>()
const {
return asBool(); }
586 template<>
inline const char * LookupAttr::iterator::asType<const char *>()
const {
return c_str(); }
587 template<>
inline std::string LookupAttr::iterator::asType<std::string>()
const {
return asString(); }
588 template<>
inline IdString LookupAttr::iterator::asType<IdString>()
const {
return idStr(); }
589 template<> CheckSum LookupAttr::iterator::asType<CheckSum>()
const;
591 template<
class TResult,
class TAttr>
607 {
return str << &obj; }
609 #endif // ZYPP_SAT_LOOKUPATTR_H
const StrMatcher & strMatcher() const
The pattern to match.
Tp asType() const
Templated return type.
::s_Dataiterator CDataiterator
Wrapped libsolv C data type exposed as backdoor.
void resetStrMatcher()
Reset the pattern to match.
void setParent(SolvAttr attr_r)
Set search within a sub-structure (SolvAttr::noAttr for none)
A Solvable object within the sat Pool.
bool equal(const boost::iterator_adaptor< OtherDerived, OtherIterator, V, C, R, D > &rhs) const
Solvable solvable() const
Whether to search in one Solvable.
bool empty() const
Whether the query is empty.
Wrapper around sat detail::CDataiterator.
String matching (STRING|SUBSTRING|GLOB|REGEX).
friend class boost::iterator_core_access
iterator subFind(SolvAttr attr_r) const
Iterator pointing to the first occurance of SolvAttr attr_r in sub-structure.
CheckSum asCheckSum() const
As CheckSum.
iterator begin() const
Iterator to the begin of query results.
void stayInThisSolvable()
Stop after all matches in the current Solvable are processed.
Solvable inSolvable() const
The current Solvable.
Repository repo() const
Whether to search in one Repository.
size_type subSize() const
Ammount of attributes in the sub-structure.
void nextSkipSolvable()
On the next call to operator++ advance to the next Solvable.
std::ostream & operator<<(std::ostream &str, const DIWrap &obj)
LookupAttr implememtation.
int asInt() const
Conversion to numeric types.
detail::CDataiterator * get() const
Expert backdoor.
Location
Specify the where to look for the attribule.
@ SOLV_ATTR
Search for solvable attributes (default)
void setRepo(Repository repo_r)
Set search in one Repository.
unsigned asUnsigned() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
detail::CDataiterator * get() const
detail::CDataiterator * operator->() const
bool solvAttrIdString() const
Whether this string attribute is available as IdString.
SolvAttr parent() const
Whether to search within a sub-structure (SolvAttr::noAttr if not)
void nextSkipRepo()
On the next call to operator++ advance to the next Repository.
std::ostream & dumpOn(std::ostream &str, const LocaleSupport &obj)
Access to the sat-pools string space.
void setSolvable(Solvable solv_r)
Set search in one Solvable.
bool pool() const
Whether to search in Pool.
bool subEmpty() const
Whether the sub-structure is empty.
bool dip_equal(const detail::CDataiterator &lhs, const detail::CDataiterator &rhs) const
SolvAttr attr() const
The SolvAttr to search.
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
unsigned long long asUnsignedLL() 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.
detail::CDataiterator * _dip
void setPool()
Set search in Pool (all repositories).
Repository inRepo() const
The current Repository.
CRepo * RepoIdType
Id type to connect Repo and sat-repo.
int IdType
Generic Id type.
void skipSolvAttr()
Immediately advance to the next SolvAttr.
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
IdString idStr() const
As IdStr.
bool solvAttrCheckSum() const
Whether this is a CheckSum attribute.
Easy-to use interface to the ZYPP dependency resolver.
const char * c_str() const
Conversion to string types.
LookupRepoAttr(SolvAttr attr_r)
LookupAttr()
Default ctor finds nothing.
const std::string & getstr() const
bool atEnd() const
Whether this points to the end of a query (Iterator is invalid).
Convenience char* constructible from std::string and char*, it maps (char*)0 to an empty string.
Lightweight repository attribute value lookup.
bool solvAttrSubEntry() const
Whether this is the entry to a sub-structure (flexarray).
IdType id() const
Expert backdoor.
RWCOW_pointer< Impl > _pimpl
void setRepo(Repository repo_r, Location=SOLV_ATTR)
Set search in one Repository.
void stayInThisRepo()
Stop after all matches in the current Repository are processed.
iterator subBegin() const
Iterator to the begin of a sub-structure.
std::string asString(const DefaultIntegral< Tp, TInitial > &obj)
bool solvAttrNumeric() const
Whether this is a numeric attribute (incl.
std::ostream & operator<<(std::ostream &str, const Exception &obj)
bool solvAttrString() const
Whether this is a string attribute.
LookupRepoAttr()
Default ctor finds nothing.
detail::IdType dereference() const
void skipSolvable()
Immediately advance to the next Solvable.
detail::IdType solvAttrType() const
The current SolvAttr type.
iterator & operator=(const iterator &rhs)
iterator end() const
Iterator behind the end of query results.
detail::IdType id() const
void nextSkipSolvAttr()
On the next call to operator++ advance to the next SolvAttr.
void setAttr(SolvAttr attr_r)
Set the SolvAttr to search.
String related utilities and Regular expression matching.
Exceptions thrown from attribute matching.
void skipRepo()
Immediately advance to the next Repository.
DIWrap()
NULL detail::CDataiterator
bool asBool() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
size_type size() const
Ammount of results.
void setPool(Location=SOLV_ATTR)
Set search in Pool (all repositories).
void setStrMatcher(const StrMatcher &matcher_r)
Set the pattern to match.
Lightweight attribute value lookup.
SolvAttr inSolvAttr() const
The current SolvAttr.
@ REPO_ATTR
Search for repository attributes.
DIWrap & operator=(const DIWrap &rhs)
std::string asString() const
This is an overloaded member function, provided for convenience. It differs from the above function o...