12 #ifndef ZYPP_RESOLVABLE_H
13 #define ZYPP_RESOLVABLE_H
18 #include <zypp/APIConfig.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); }
Combining sat::Solvable and ResStatus.
Base for resolvable objects.
TraitsType::constPtrType constPtr
ResTraits< Self > TraitsType
friend std::ostream & operator<<(std::ostream &str, const Resolvable &obj)
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.
std::ostream & operator<<(std::ostream &str, const Resolvable &obj)
Stream output.
Resolvable(const sat::Solvable &solvable_r)
Ctor.
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.
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...
bool compareByNVRA(const SolvableType< Derived > &lhs, const Solvable &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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...
Easy-to use interface to the ZYPP dependency resolver.
bool isKind< ResObject >(const Resolvable::constPtr &p)
bool isKind< Resolvable >(const Resolvable::constPtr &p)
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
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.