libzypp 17.35.9
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#include <utility>
17
19#include <zypp/ui/Selectable.h>
20
22namespace zypp
23{
25 namespace ui
26 {
28 namespace selfilter
29 {
30
32 struct ByKind
33 {
35 : _kind(std::move( kind_r ))
36 {}
37
38 bool operator()( const Selectable::constPtr & obj ) const
39 {
40 return obj && obj->kind() == _kind;
41 }
42
44 };
45
47 struct ByName
48 {
49 ByName( std::string name_r )
50 : _name(std::move( name_r ))
51 {}
52
54 { return obj && obj->name() == _name; }
55
56 std::string _name;
57 };
58
61 {
63 { return obj && !obj->installedEmpty(); }
64 };
65
68 {
70 { return obj && obj->hasCandidateObj(); }
71 };
72
73 struct ByStatus
75 {
79
81 { return obj && obj->status() == _status; }
82
84 };
85
87 } // namespace selfilter
90 } // namespace ui
93} // namespace zypp
95#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:95
Resolvable kinds.
Definition ResKind.h:33
Definition Arch.h:364
Status
UI status Status values calculated by Selectable.
Definition Status.h:36
Easy-to use interface to the ZYPP dependency resolver.
bool operator()(const ui::Selectable::constPtr &obj) const
Definition SelFilters.h:69
bool operator()(const ui::Selectable::constPtr &obj) const
Definition SelFilters.h:62
bool operator()(const Selectable::constPtr &obj) const
Definition SelFilters.h:38
bool operator()(const ui::Selectable::constPtr &obj) const
Definition SelFilters.h:53
ByName(std::string name_r)
Definition SelFilters.h:49
ByStatus(Status status_r)
Definition SelFilters.h:76
bool operator()(const ui::Selectable::constPtr &obj) const
Definition SelFilters.h:80