libzypp: zypp/Pattern.h Source File

libzypp 17.38.14

Pattern.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_PATTERN_H
13#define ZYPP_PATTERN_H
14
15#include <zypp/ResObject.h>
16#include <zypp-core/Pathname.h>
17#include <zypp/sat/SolvableSet.h>
18
20namespace zypp
21{
22
23 DEFINE_PTR_TYPE(Pattern);
24
26 //
27 // CLASS NAME : Pattern
28 //
31 class ZYPP_API Pattern : public ResObject
32 {
33 public:
34 using Self = Pattern;
35 using TraitsType = ResTraits<Self>;
36 using Ptr = TraitsType::PtrType;
37 using constPtr = TraitsType::constPtrType;
38
39 public:
40 using NameList = sat::ArrayAttr<IdString, IdString>;
41 using Contents = sat::SolvableSet;
42
43 public:
45 bool isDefault() const;
47 bool userVisible() const;
49 std::string category( const Locale & lang_r = Locale() ) const;
51 Pathname icon() const;
53 Pathname script() const;
55 std::string order() const;
56
57 public:
68
69 bool isAutoPattern() const;
71 sat::Solvable autoPackage() const;
73 public:
75 NameList includes() const;
76
78 NameList extends() const;
79
81 Contents core() const;
82
86 Contents depends( bool includeSuggests_r = true ) const;
88 Contents dependsNoSuggests() const
89 { return depends( false ); }
90
95 Contents contents( bool includeSuggests_r = true ) const;
97 Contents contentsNoSuggests() const
98 { return contents( false ); }
99
100#if LEGACY(1735)
101 public:
103 struct ZYPP_DEPRECATED ContentsSet
104 {
105 Contents req;
106 Contents rec;
107 Contents sug;
108 };
110 void contentsSet( ContentsSet & collect_r, bool recursively_r = false ) const ZYPP_DEPRECATED;
112 void fullContentsSet( ContentsSet & collect_r ) const ZYPP_DEPRECATED
113 { return contentsSet( collect_r, /*recursively_r*/true ); }
114#endif
115
116 protected:
117 friend Ptr make<Self>( const sat::Solvable & solvable_r );
119 Pattern( const sat::Solvable & solvable_r );
121 ~Pattern() override;
122 };
123
124
126} // namespace zypp
128#endif // ZYPP_PATTERN_H
ZYPP_DEPRECATED
#define ZYPP_DEPRECATED
The ZYPP_DEPRECATED macro can be used to trigger compile-time warnings with gcc >= 3....
Definition Globals.h:112
Pathname.h
DEFINE_PTR_TYPE
#define DEFINE_PTR_TYPE(NAME)
Forward declaration of Ptr types.
Definition PtrTypes.h:639
ResObject.h
SolvableSet.h
zypp::Locale
'Language[_Country]' codes.
Definition Locale.h:51
zypp::Pattern
Pattern interface.
Definition Pattern.h:32
zypp::Pattern::core
Contents core() const
Ui hint: Required Packages.
Definition Pattern.cc:240
zypp::Pattern::extends
NameList extends() const
Ui hint: patterns this one extends.
Definition Pattern.cc:223
zypp::Pattern::category
std::string category(const Locale &lang_r=Locale()) const
Definition Pattern.cc:192
zypp::Pattern::constPtr
TraitsType::constPtrType constPtr
Definition Pattern.h:37
zypp::Pattern::contentsNoSuggests
Contents contentsNoSuggests() const
Definition Pattern.h:97
zypp::Pattern::depends
Contents depends(bool includeSuggests_r=true) const
Ui hint: Dependent packages.
Definition Pattern.cc:258
zypp::Pattern::script
Pathname script() const
Definition Pattern.cc:198
zypp::Pattern::Contents
sat::SolvableSet Contents
Definition Pattern.h:41
zypp::Pattern::Ptr
TraitsType::PtrType Ptr
Definition Pattern.h:36
zypp::Pattern::isDefault
bool isDefault() const
Definition Pattern.cc:180
zypp::Pattern::Pattern
Pattern(const sat::Solvable &solvable_r)
Ctor.
Definition Pattern.cc:173
zypp::Pattern::userVisible
bool userVisible() const
Definition Pattern.cc:183
zypp::Pattern::order
std::string order() const
Definition Pattern.cc:201
zypp::Pattern::autoPackage
sat::Solvable autoPackage() const
The corresponding patterns- package if isAutoPattern.
Definition Pattern.cc:207
zypp::Pattern::includes
NameList includes() const
Ui hint: included patterns.
Definition Pattern.cc:220
zypp::Pattern::Self
Pattern Self
Definition Pattern.h:34
zypp::Pattern::NameList
sat::ArrayAttr< IdString, IdString > NameList
Definition Pattern.h:40
zypp::Pattern::contents
Contents contents(bool includeSuggests_r=true) const
The collection of packages associated with this pattern.
Definition Pattern.cc:284
zypp::Pattern::dependsNoSuggests
Contents dependsNoSuggests() const
Definition Pattern.h:88
zypp::Pattern::icon
Pathname icon() const
Definition Pattern.cc:195
zypp::Pattern::TraitsType
ResTraits< Self > TraitsType
Definition Pattern.h:35
zypp::Pattern::isAutoPattern
bool isAutoPattern() const
This patterns is auto-defined by a patterns- package.
Definition Pattern.cc:204
zypp::ResObject::ResObject
ResObject(const sat::Solvable &solvable_r)
Ctor.
Definition ResObject.cc:23
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:48
zypp::sat::ArrayAttr
LookupAttr::TransformIterator based container to retrieve list attributes.
Definition LookupAttrTools.h:157
zypp::sat::SolvableSet
Solvable set wrapper to allow adding additional convenience iterators.
Definition SolvableSet.h:36
zypp::sat::Solvable
A Solvable object within the sat Pool.
Definition Solvable.h:54
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2
zypp::make
ResTraits< TRes >::PtrType make(const sat::Solvable &solvable_r)
Directly create a certain kind of ResObject from sat::Solvable.
Definition ResObject.h:118
zypp::ZYPP_API
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
Definition Arch.h:173
zypp::ResTraits
ResTraits.
Definition ResTraits.h:80
zypp::ResTraits< Self >::PtrType
intrusive_ptr< Self > PtrType
Definition ResTraits.h:82
zypp::ResTraits< Self >::constPtrType
intrusive_ptr< const Self > constPtrType
Definition ResTraits.h:83