12#ifndef ZYPP_SAT_SOLVABLE_H
13#define ZYPP_SAT_SOLVABLE_H
47 template<>
const Pool &
poolFromType(
const Solvable & );
97 explicit operator bool()
const
120 template<
class TIterator>
121 bool isKind( TIterator begin, TIterator end )
const
122 {
for_( it, begin, end )
if (
isKind( *it ) )
return true;
return false; }
125 std::string
name()
const;
194 {
return dep( which_r ); }
225 void getSupportedLocales( LocaleSet & locales_r ) const
226 { locales_r = getSupportedLocales(); }
347 {
return lhs.
get() == rhs.
get(); }
351 {
return lhs.
get() != rhs.
get(); }
355 {
return lhs.
get() < rhs.
get(); }
378 res = lhs.
name().compare( rhs.
name() );
414 , boost::forward_traversal_tag
445 {
_val = val_r; base_reference() =
_val.get(); }
453 template <
typename T>
456 template <
typename T>
459 template <
typename T,
typename =
void >
462 static_assert(
always_false_v<T>,
"Type must have .satSolvable() or a specialization of detail::convert_to_solvable" );
465 template <
typename T>
467 template <
typename SType = T>
469 return std::forward<SType>(obj).satSolvable();
485 template <
typename T>
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
#define ZYPP_DEFINE_ID_HASHABLE(C)
Define hash function for id based classes.
int compare(const Arch &rhs) const
Arch comparison.
Store and operate with byte count.
Common Platform Enumearation (2.3) See http://cpe.mitre.org/ for more information on the Common Platf...
Store and operate on date (time_t).
Edition represents [epoch:]version[-release].
Access to the sat-pools string space.
'Language[_Country]' codes.
static int compare(const Derived &lhs, const Derived &rhs)
Container of Capability (currently read only).
A Solvable object within the sat Pool.
std::string lookupStrAttribute(const SolvAttr &attr) const
returns the string attribute value for attr or an empty string if it does not exists.
Capabilities dep(Dep which_r) const
Return Capabilities selected by Dep constant.
static const IdString ptfPackageToken
Indicator provides ptf-package().
detail::CSolvable * get() const
Expert backdoor.
bool lookupBoolAttribute(const SolvAttr &attr) const
returns the boolean attribute value for attr or false if it does not exists.
Capabilities dep_conflicts() const
std::string summary(const Locale &lang_r=Locale()) const
Short (singleline) text describing the solvable (opt.
bool identical(const Solvable &rhs) const
Test whether two Solvables have the same content.
Solvable()
Default ctor creates noSolvable.
std::string name() const
The name (without any ResKind prefix).
bool needToAcceptLicense() const
True except for well known exceptions (i.e show license but no need to accept it).
Capabilities operator[](Dep which_r) const
bool isKind(TIterator begin, TIterator end) const
CapabilitySet valuesOfNamespace(const std::string &namespace_r) const
Return 'value[ op edition]' for namespaced provides 'namespace(value)[ op edition]'.
Solvable(const Solvable &)=default
static const IdString productToken
Indicator provides product().
ResKind kind() const
The Solvables ResKind.
CpeId cpeId() const
The solvables CpeId if available.
zypp::ByteCount installSize() const
Installed (unpacked) size.
bool isKind() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
static const IdString retractedToken
Indicator provides retracted-patch-package().
Capabilities dep_prerequires() const
Solvable nextInPool() const
Return next Solvable in Pool (or noSolvable).
static const IdString patternToken
Indicator provides pattern().
bool isSystem() const
Return whether this Solvable belongs to the system repo.
bool sameNVRA(const Solvable &rhs) const
Test for same name-version-release.arch.
std::string delnotify(const Locale &lang_r=Locale()) const
UI hint text when selecting the solvable for uninstall (opt.
Capabilities dep_enhances() const
std::string licenseToConfirm(const Locale &lang_r=Locale()) const
License or agreement to accept before installing the solvable (opt.
Edition edition() const
The edition (version-release).
bool supportsLocale(const Locale &locale_r) const
Whether this Solvable supports a specific Locale.
std::string description(const Locale &lang_r=Locale()) const
Long (multiline) text describing the solvable (opt.
LocaleSet getSupportedLocales() const
Return the supported locales.
Capabilities dep_requires() const
Capabilities dep_supplements() const
detail::IdType lookupIdAttribute(const SolvAttr &attr) const
returns the id attribute value for attr or detail::noId if it does not exists.
IdString ident() const
The identifier.
zypp::Date installtime() const
The items install time (false if not installed).
Capabilities dep_obsoletes() const
unsigned long long lookupNumAttribute(const SolvAttr &attr) const
returns the numeric attribute value for attr or 0 if it does not exists.
Capabilities dep_suggests() const
detail::SolvableIdType IdType
IdType id() const
Expert backdoor.
std::string insnotify(const Locale &lang_r=Locale()) const
UI hint text when selecting the solvable for install (opt.
zypp::CheckSum lookupCheckSumAttribute(const SolvAttr &attr) const
returns the CheckSum attribute value for attr or an empty CheckSum if ir does not exist.
Capabilities dep_recommends() const
Capabilities dep_provides() const
CapabilitySet providesNamespace(const std::string &namespace_r) const
Return the namespaced provides 'namespace([value])[ op edition]' of this Solvable.
std::string distribution() const
The distribution string.
static const Solvable noSolvable
Represents no Solvable.
Arch arch() const
The architecture.
zypp::ByteCount downloadSize() const
Download size.
bool isKind(const ResKind &kind_r) const
Test whether a Solvable is of a certain ResKind.
IdString vendor() const
The vendor.
Solvable nextInRepo() const
Return next Solvable in Repo (or noSolvable).
detail::RepoIdType repository() const
The repo id this Solvable belongs to.
zypp::Date buildtime() const
The items build time.
Solvable(Solvable &&) noexcept=default
unsigned mediaNr() const
Media number the solvable is located on (0 if no media access required).
std::pair< bool, CapabilitySet > matchesSolvable(const SolvAttr &attr, const Solvable &solv) const
static const IdString ptfMasterToken
Indicator provides ptf().
bool supportsLocales() const
Whether this Solvable claims to support locales.
Solvable dereference() const
SolvableIterator(const Solvable &val_r)
void initialAssignVal(const Solvable &val_r)
SolvableIterator(SolvableIdType id_r)
void assignVal(const Solvable &val_r)
friend class boost::iterator_core_access
constexpr bool is_detected_v
int compareByN(const Solvable &lhs, const Solvable &rhs)
relates: Solvable Compare according to kind and name.
bool identical(const Solvable &lhs, const Solvable &rhs)
relates: Solvable Test for same content.
bool operator!=(const FileConflicts &lhs, const FileConflicts &rhs)
relates: FileConflicts
bool isKind(const Solvable &solvable_r)
relates: Solvable Test whether a Solvable is of a certain Kind.
bool operator<(const LocaleSupport &lhs, const LocaleSupport &rhs)
relates: LocaleSupport
bool operator==(const FileConflicts &lhs, const FileConflicts &rhs)
relates: FileConflicts
bool sameNVRA(const Solvable &lhs, const Solvable &rhs)
relates: Solvable Test for same name version release and arch.
int compareByNVRA(const Solvable &lhs, const Solvable &rhs)
relates: Solvable Compare according to kind, name, edition and arch.
int compareByNVR(const Solvable &lhs, const Solvable &rhs)
relates: Solvable Compare according to kind, name and edition.
std::unordered_set< Locale > LocaleSet
constexpr bool always_false_v
ResKind resKind()
Convenient access to well known ResKinds.
CLASS NAME : detail::DIWrap.
zypp::sat::detail::CSolvable CSolvable
zypp::sat::detail::RepoIdType RepoIdType
zypp::sat::detail::SolvableIdType SolvableIdType
decltype(std::declval< T >().satSolvable()) satSolvable_t
zypp::sat::detail::IdType IdType
constexpr bool has_satSolvable_v
This file contains private API, this might break at any time between releases.
std::unordered_set< Capability > CapabilitySet
Enumeration class of dependency types.
for_use_in_switch inSwitch() const
Enumarator provided for use in switch statement.
To Solvable transform functor.
Solvable operator()(T &&obj) const
Solvable operator()(const Solvable &solv_r) const
static Solvable asSolvable(SType &&obj)