12#ifndef ZYPP_RESOLVABLE_H
13#define ZYPP_RESOLVABLE_H
20#include <zypp/base/ReferenceCounted.h>
21#include <zypp/base/NonCopyable.h>
22#include <zypp/base/PtrTypes.h>
75 virtual std::ostream &
dumpOn( std::ostream &
str )
const;
100 {
return p && p->isKind<TRes>(); }
123 {
return dynamic_pointer_cast<TRes>(p); }
127 {
return dynamic_pointer_cast<const TRes>(p); }
140 ret = compareByN( *lhs, *rhs );
154 ret = compareByNVR( *lhs, *rhs );
168 ret = compareByNVRA( *lhs, *rhs );
Provides API related macros.
Combining sat::Solvable and ResStatus.
Base for resolvable objects.
TraitsType::constPtrType constPtr
ResTraits< Self > TraitsType
int compareByN(const Resolvable::constPtr &lhs, const Resolvable::constPtr &rhs)
Compare Resolvable::constPtr according to kind and name.
std::ostream & dumpOn(std::ostream &str, const Resolvable &obj)
More verbose stream output including dependencies.
friend std::ostream & operator<<(std::ostream &str, const Resolvable &obj)
TraitsType::KindType Kind
int compareByNVRA(const Resolvable::constPtr &lhs, const Resolvable::constPtr &rhs)
Compare Resolvable::constPtr according to kind, name, edition and arch.
PoolItem poolItem() const
Access the corresponding PoolItem.
virtual std::ostream & dumpOn(std::ostream &str) const
Helper for stream output.
ResTraits< TRes >::PtrType asKind(const Resolvable::Ptr &p)
Convert Resolvable::Ptr into Ptr of a certain Kind.
int compareByNVR(const Resolvable::constPtr &lhs, const Resolvable::constPtr &rhs)
Compare according to kind, name and edition.
virtual ~Resolvable()
Dtor.
bool isKind(const Resolvable::constPtr &p)
Test whether a Resolvable::Ptr is of a certain Kind.
Base class for reference counted objects.
A Solvable object within the sat Pool.
String related utilities and Regular expression matching.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Easy-to use interface to the ZYPP dependency resolver.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
bool isKind< ResObject >(const Resolvable::constPtr &p)
bool isKind< Resolvable >(const Resolvable::constPtr &p)
ResTraits< TRes >::PtrType asKind(const sat::Solvable &solvable_r)
Directly create a certain kind of ResObject from sat::Solvable.
intrusive_ptr< const TRes > constPtrType
intrusive_ptr< TRes > PtrType
Base class for creating Solvable based types.
Solvable satSolvable() const
Return the corresponding sat::Solvable.