libzypp 17.31.32
SelFilters.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_UI_SELFILTERS_H
13#define ZYPP_UI_SELFILTERS_H
14
15#include <string>
16
18#include <zypp/ui/Selectable.h>
19
21namespace zypp
22{
24 namespace ui
25 {
27 namespace selfilter
28 {
29
31 struct ByKind
32 {
34 : _kind( kind_r )
35 {}
36
37 bool operator()( const Selectable::constPtr & obj ) const
38 {
39 return obj && obj->kind() == _kind;
40 }
41
43 };
44
46 struct ByName
47 {
48 ByName( const std::string & name_r )
49 : _name( name_r )
50 {}
51
53 { return obj && obj->name() == _name; }
54
55 std::string _name;
56 };
57
60 {
62 { return obj && !obj->installedEmpty(); }
63 };
64
67 {
69 { return obj && obj->hasCandidateObj(); }
70 };
71
72 struct ByStatus
74 {
78
80 { return obj && obj->status() == _status; }
81
83 };
84
86 } // namespace selfilter
89 } // namespace ui
92} // namespace zypp
94#endif // ZYPP_UI_SELFILTERS_H
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition AutoDispose.h:94
Resolvable kinds.
Definition ResKind.h:33
Status
UI status Status values calculated by Selectable.
Definition Status.h:35
Easy-to use interface to the ZYPP dependency resolver.
bool operator()(const ui::Selectable::constPtr &obj) const
Definition SelFilters.h:68
bool operator()(const ui::Selectable::constPtr &obj) const
Definition SelFilters.h:61
bool operator()(const Selectable::constPtr &obj) const
Definition SelFilters.h:37
ByKind(const ResKind &kind_r)
Definition SelFilters.h:33
ByName(const std::string &name_r)
Definition SelFilters.h:48
bool operator()(const ui::Selectable::constPtr &obj) const
Definition SelFilters.h:52
ByStatus(Status status_r)
Definition SelFilters.h:75
bool operator()(const ui::Selectable::constPtr &obj) const
Definition SelFilters.h:79