12#ifndef ZYPP_SAT_SOLVABLE_H
13#define ZYPP_SAT_SOLVABLE_H
35 class OnMediaLocation;
65 : _id( detail::noSolvableId )
83 explicit operator bool()
const
104 {
return isKind( resKind<TRes>() ); }
106 template<
class TIterator>
107 bool isKind( TIterator begin, TIterator end )
const
108 {
for_( it, begin, end )
if (
isKind( *it ) )
return true;
return false; }
111 std::string name()
const;
130 bool isSystem()
const;
135 bool onSystemByUser()
const;
140 bool onSystemByAuto()
const;
144 {
return identIsAutoInstalled( ident() ); }
146 static bool identIsAutoInstalled(
const IdString & ident_r );
151 bool multiversionInstall()
const;
154 bool isNeedreboot()
const;
175 bool isBlacklisted()
const;
178 bool isRetracted()
const;
184 bool isPtfMaster()
const;
187 bool isPtfPackage()
const;
191 Date buildtime()
const;
194 Date installtime()
const;
204 std::string asString()
const;
216 {
return( get() == rhs.
get() || ( ident() == rhs.
ident() && edition() == rhs.
edition() && arch() == rhs.
arch() ) ); }
239 case Dep::PROVIDES_e:
return provides();
break;
240 case Dep::REQUIRES_e:
return requires();
break;
241 case Dep::CONFLICTS_e:
return conflicts();
break;
242 case Dep::OBSOLETES_e:
return obsoletes();
break;
243 case Dep::RECOMMENDS_e:
return recommends();
break;
244 case Dep::SUGGESTS_e:
return suggests();
break;
245 case Dep::ENHANCES_e:
return enhances();
break;
246 case Dep::SUPPLEMENTS_e:
return supplements();
break;
247 case Dep::PREREQUIRES_e:
return prerequires();
break;
253 {
return dep( which_r ); }
257 CapabilitySet providesNamespace(
const std::string & namespace_r )
const;
266 CapabilitySet valuesOfNamespace(
const std::string & namespace_r )
const;
275 bool supportsLocales()
const;
277 bool supportsLocale(
const Locale & locale_r )
const;
279 bool supportsLocale(
const LocaleSet & locales_r )
const;
283 bool supportsRequestedLocales()
const;
288 { locales_r = getSupportedLocales(); }
296 unsigned mediaNr()
const;
325 std::string distribution()
const;
328 std::string summary(
const Locale & lang_r =
Locale() )
const;
331 std::string description(
const Locale & lang_r =
Locale() )
const;
334 std::string insnotify(
const Locale & lang_r =
Locale() )
const;
336 std::string delnotify(
const Locale & lang_r =
Locale() )
const;
339 std::string licenseToConfirm(
const Locale & lang_r =
Locale() )
const;
341 bool needToAcceptLicense()
const;
379 std::string lookupStrAttribute(
const SolvAttr &
attr )
const;
396 unsigned long long lookupNumAttribute(
const SolvAttr &
attr )
const;
398 unsigned long long lookupNumAttribute(
const SolvAttr &
attr,
unsigned long long notfound_r )
const;
404 bool lookupBoolAttribute(
const SolvAttr &
attr )
const;
451 {
return lhs.
get() == rhs.
get(); }
455 {
return lhs.
get() != rhs.
get(); }
459 {
return lhs.
get() < rhs.
get(); }
482 res = lhs.
name().compare( rhs.
name() );
518 , boost::forward_traversal_tag
575 Solvable operator()(
const ResObject_constPtr & res_r )
const;
int compare(const Arch &rhs) const
Arch comparison.
Store and operate with byte count.
Convenience char* constructible from std::string and char*, it maps (char*)0 to an empty string.
Container of Capability (currently read only).
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]
static int compare(const Derived &lhs, const Derived &rhs)
Access to the sat-pools string space.
'Language[_Country]' codes.
Combining sat::Solvable and ResStatus.
What is known about a repository.
Helper that splits an identifier into kind and name or vice versa.
A Solvable object within the sat Pool.
IdType id() const
Expert backdoor.
bool isKind(const Solvable &solvable_r)
Test whether a Solvable is of a certain Kind.
bool identIsAutoInstalled() const
Whether an installed solvable with the same ident is flagged as AutoInstalled.
bool isKind(TIterator begin, TIterator end) const
Capabilities dep(Dep which_r) const
Return Capabilities selected by Dep constant.
bool identical(const Solvable &lhs, const Solvable &rhs)
Test for same content.
int compareByNVR(const Solvable &lhs, const Solvable &rhs)
Compare according to kind, name and edition.
void getSupportedLocales(LocaleSet &locales_r) const
ResKind kind() const
The Solvables ResKind.
static const Solvable noSolvable
Represents no Solvable.
Solvable(const Solvable &)=default
int compareByN(const Solvable &lhs, const Solvable &rhs)
Compare according to kind and name.
Solvable(Solvable &&) noexcept=default
Capabilities operator[](Dep which_r) const
Edition edition() const
The edition (version-release).
bool sameNVRA(const Solvable &rhs) const
Test for same name-version-release.arch.
static const IdString ptfMasterToken
Indicator provides ptf()
Solvable()
Default ctor creates noSolvable.
bool operator==(const Solvable &lhs, const Solvable &rhs)
detail::CSolvable * get() const
Expert backdoor.
Arch arch() const
The architecture.
static const IdString ptfPackageToken
Indicator provides ptf-package()
Solvable nextInPool() const
Return next Solvable in Pool (or noSolvable).
bool operator!=(const Solvable &lhs, const Solvable &rhs)
static const IdString retractedToken
Indicator provides retracted-patch-package()
bool sameNVRA(const Solvable &lhs, const Solvable &rhs)
Test for same name version release and arch.
std::string name() const
The name (without any ResKind prefix).
bool isKind(const ResKind &kind_r) const
Test whether a Solvable is of a certain ResKind.
bool operator<(const Solvable &lhs, const Solvable &rhs)
IdString ident() const
The identifier.
int compareByNVRA(const Solvable &lhs, const Solvable &rhs)
Compare according to kind, name, edition and arch.
sat::detail::SolvableIdType IdType
bool isKind() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool identical(const Solvable &rhs) const
Test whether two Solvables have the same content.
Iterate over valid Solvables in the pool.
void initialAssignVal(const Solvable &val_r)
SolvableIterator(SolvableIdType id_r)
Solvable dereference() const
void assignVal(const Solvable &val_r)
SolvableIterator(const Solvable &val_r)
friend class boost::iterator_core_access
String related utilities and Regular expression matching.
unsigned int SolvableIdType
Id type to connect Solvable and sat-solvable.
int IdType
Generic Id type.
::s_Solvable CSolvable
Wrapped libsolv C data type exposed as backdoor.
bool compareByNVR(const SolvableType< Derived > &lhs, const Solvable &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
std::ostream & dumpOn(std::ostream &str, const LocaleSupport &obj)
std::ostream & dumpAsXmlOn(std::ostream &str, const FileConflicts &obj)
bool compareByN(const SolvableType< Derived > &lhs, const Solvable &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool identical(const SolvableType< Derived > &lhs, const Solvable &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Easy-to use interface to the ZYPP dependency resolver.
std::unordered_set< Locale > LocaleSet
std::unordered_set< Capability > CapabilitySet
std::string asUserString(VendorSupportOption opt)
converts the support option to a name intended to be printed to the user.
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
bool isKind(const ResKind &val_r)
Convenient test for ResKinds.
Enumeration class of dependency types.
for_use_in_switch inSwitch() const
Enumarator provided for use in switch statement.
To Solvable transform functor.
Solvable operator()(const Solvable &solv_r) const
Backlink to the associated PoolImpl.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
#define ZYPP_DEFINE_ID_HASHABLE(C)
Define hash function for id based classes.