12 #ifndef ZYPP_SAT_LOOKUPATTR_H 13 #define ZYPP_SAT_LOOKUPATTR_H 19 #include <zypp-core/base/DefaultIntegral> 31 struct MatchException;
154 iterator begin() const;
157 iterator end() const;
168 template<class TResult, class TAttr = TResult>
198 void setStrMatcher( const
StrMatcher & matcher_r );
201 void resetStrMatcher();
211 void setPool(
Location = SOLV_ATTR );
223 void setSolvable(
Solvable solv_r );
308 std::string mstring_r = std::string(),
int flags_r = 0 );
311 const char * mstring_r,
int flags_r = 0 );
319 std::swap( _dip, rhs._dip );
320 std::swap( _mstring, rhs._mstring );
339 const std::string &
getstr()
const {
return _mstring; }
359 , detail::CDataiterator *
361 , boost::forward_traversal_tag
369 void nextSkipSolvAttr();
372 void nextSkipSolvable();
379 { nextSkipSolvAttr(); increment(); }
383 { nextSkipSolvable(); increment(); }
387 { nextSkipRepo(); increment(); }
390 void stayInThisSolvable();
393 void stayInThisRepo();
418 bool solvAttrNumeric()
const;
421 bool solvAttrString()
const;
424 bool solvAttrIdString()
const;
427 bool solvAttrCheckSum()
const;
433 bool solvAttrSubEntry()
const;
467 bool subEmpty()
const;
502 unsigned asUnsigned()
const;
506 unsigned long long asUnsignedLL()
const;
509 const char * c_str()
const;
524 {
return idStr().id(); }
535 template<
class Tp> Tp
asType()
const {
return Tp(
id()); }
558 friend class boost::iterator_core_access;
560 template <
class OtherDerived,
class OtherIterator,
class V,
class C,
class R,
class D>
561 bool equal(
const boost::iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> & rhs )
const 563 return (
bool(base()) ==
bool(rhs.base()) )
564 && ( ! base() || dip_equal( *base(), *rhs.base() ) );
576 {
return _dip.get(); }
589 template<>
inline int LookupAttr::iterator::asType<int>()
const {
return asInt(); }
590 template<>
inline unsigned LookupAttr::iterator::asType<unsigned>()
const {
return asUnsigned(); }
591 template<>
inline unsigned long long LookupAttr::iterator::asType<unsigned long long>()
const {
return asUnsignedLL(); }
592 template<>
inline bool LookupAttr::iterator::asType<bool>()
const {
return asBool(); }
593 template<>
inline const char * LookupAttr::iterator::asType<const char *>()
const {
return c_str(); }
594 template<>
inline std::string LookupAttr::iterator::asType<std::string>()
const {
return asString(); }
595 template<>
inline IdString LookupAttr::iterator::asType<IdString>()
const {
return idStr(); }
596 template<>
CheckSum LookupAttr::iterator::asType<CheckSum>()
const;
598 template<
class TResult,
class TAttr>
614 {
return str << &obj; }
616 #endif // ZYPP_SAT_LOOKUPATTR_H std::string asString(const Patch::Category &obj)
DIWrap()
NULL detail::CDataiterator
void skipSolvAttr()
Immediately advance to the next SolvAttr.
A Solvable object within the sat Pool.
void setPool(Location=SOLV_ATTR)
Set search in Pool (all repositories).
Solvable solvable() const
Whether to search in one Solvable.
::s_Dataiterator CDataiterator
Wrapped libsolv C data type exposed as backdoor.
String matching (STRING|SUBSTRING|GLOB|REGEX).
Lightweight attribute value lookup.
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
void setSolvable(Solvable solv_r)
Set search in one Solvable.
bool equal(const boost::iterator_adaptor< OtherDerived, OtherIterator, V, C, R, D > &rhs) const
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
int IdType
Generic Id type.
Access to the sat-pools string space.
const std::string & getstr() const
LookupAttr::TransformIterator based container to retrieve list attributes.
Exceptions thrown from attribute matching.
void skipRepo()
Immediately advance to the next Repository.
LookupAttr implememtation.
void skipSolvable()
Immediately advance to the next Solvable.
detail::IdType id() const
DIWrap & operator=(const DIWrap &rhs)
Tp asType() const
Templated return type.
Lightweight repository attribute value lookup.
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Convenience char* constructible from std::string and char*, it maps (char*)0 to an empty string...
LookupRepoAttr(SolvAttr attr_r)
Wrapper around sat detail::CDataiterator.
std::ostream & dumpOn(std::ostream &str, const LocaleSupport &obj)
LookupRepoAttr()
Default ctor finds nothing.
detail::CDataiterator * operator->() const
void setPool()
Set search in Pool (all repositories).
CRepo * RepoIdType
Id type to connect Repo and sat-repo.
detail::CDataiterator * _dip
unsigned int SolvableIdType
Id type to connect Solvable and sat-solvable.
bool atEnd() const
Whether this points to the end of a query (Iterator is invalid).
Easy-to use interface to the ZYPP dependency resolver.
Location
Specify the where to look for the attribule.
RW_pointer supporting 'copy on write' functionality.
void swap(DIWrap &rhs) noexcept