1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/ui/Selectable.cc
13 //#include "zypp/base/Logger.h"
15 #include "zypp/ui/Selectable.h"
16 #include "zypp/ui/SelectableImpl.h"
18 ///////////////////////////////////////////////////////////////////
20 { /////////////////////////////////////////////////////////////////
21 ///////////////////////////////////////////////////////////////////
23 { /////////////////////////////////////////////////////////////////
25 ///////////////////////////////////////////////////////////////////
27 // METHOD NAME : Selectable::Selectable
30 Selectable::Selectable( Impl_Ptr pimpl_r )
34 ///////////////////////////////////////////////////////////////////
36 // METHOD NAME : Selectable::~Selectable
39 Selectable::~Selectable()
42 ///////////////////////////////////////////////////////////////////
44 // Forward to implementation.
45 // Restrict PoolItems to ResObject::constPtr!
47 ///////////////////////////////////////////////////////////////////
49 ResObject::Kind Selectable::kind() const
50 { return _pimpl->kind(); }
52 const std::string & Selectable::name() const
53 { return _pimpl->name(); }
55 Status Selectable::status() const
56 { return _pimpl->status(); }
58 bool Selectable::set_status( const Status state_r )
59 { return _pimpl->set_status( state_r ); }
61 ResObject::constPtr Selectable::installedObj() const
62 { return _pimpl->installedObj(); }
64 ResObject::constPtr Selectable::candidateObj() const
65 { return _pimpl->candidateObj(); }
67 ResObject::constPtr Selectable::setCandidate( ResObject::constPtr byUser_r )
68 { return _pimpl->setCandidate( byUser_r ); }
70 ResObject::constPtr Selectable::theObj() const
71 { return _pimpl->theObj(); }
73 Selectable::size_type Selectable::availableObjs() const
74 { return _pimpl->availableObjs(); }
76 Selectable::available_iterator Selectable::availableBegin() const
77 { return make_transform_iterator( _pimpl->availableBegin(),
78 SelectableTraits::TransformToResObjectPtr() ); }
80 Selectable::available_iterator Selectable::availableEnd() const
81 { return make_transform_iterator( _pimpl->availableEnd(),
82 SelectableTraits::TransformToResObjectPtr() ); }
84 /******************************************************************
86 ** FUNCTION NAME : operator<<
87 ** FUNCTION TYPE : std::ostream &
89 std::ostream & operator<<( std::ostream & str, const Selectable & obj )
91 return str << *obj._pimpl;
94 /////////////////////////////////////////////////////////////////
96 ///////////////////////////////////////////////////////////////////
97 /////////////////////////////////////////////////////////////////
99 ///////////////////////////////////////////////////////////////////