libzypp  15.28.6
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/Pathname.h"
17 
19 namespace zypp
20 {
21 
22  DEFINE_PTR_TYPE(Pattern);
23 
25  //
26  // CLASS NAME : Pattern
27  //
30  class Pattern : public ResObject
31  {
32  public:
33  typedef Pattern Self;
37 
38  public:
41 
42  public:
44  bool isDefault() const;
46  bool userVisible() const;
48  std::string category( const Locale & lang_r = Locale() ) const;
50  Pathname icon() const;
52  Pathname script() const;
54  std::string order() const;
55 
56  public:
68  bool isAutoPattern() const;
70  sat::Solvable autoPackage() const;
72  public:
74  NameList includes() const;
75 
77  NameList extends() const;
78 
80  Contents core() const;
81 
85  Contents depends( bool includeSuggests_r = true ) const;
88  { return depends( false ); }
89 
94  Contents contents( bool includeSuggests_r = true ) const;
97  { return contents( false ); }
98 
99  protected:
100  friend Ptr make<Self>( const sat::Solvable & solvable_r );
102  Pattern( const sat::Solvable & solvable_r );
104  virtual ~Pattern();
105  };
107 
109 } // namespace zypp
111 #endif // ZYPP_PATTERN_H
std::string order() const
Definition: Pattern.cc:201
bool userVisible() const
Definition: Pattern.cc:183
sat::Solvable autoPackage() const
The corresponding patterns- package if isAutoPattern.
Definition: Pattern.cc:207
Pathname icon() const
Definition: Pattern.cc:195
A Solvable object within the sat Pool.
Definition: Solvable.h:53
intrusive_ptr< const TRes > constPtrType
Definition: ResTraits.h:83
TraitsType::PtrType Ptr
Definition: Pattern.h:35
sat::ArrayAttr< IdString, IdString > NameList
Definition: Pattern.h:39
Pattern Self
Definition: Pattern.h:33
Contents contentsNoSuggests() const
Definition: Pattern.h:96
bool isAutoPattern() const
This patterns is auto-defined by a patterns- package.
Definition: Pattern.cc:204
LookupAttr::TransformIterator based container to retrieve list attributes.
Definition: LookupAttr.h:592
ResTraits.
Definition: ResTraits.h:79
Pathname script() const
Definition: Pattern.cc:198
sat::SolvableSet Contents
Definition: Pattern.h:40
NameList extends() const
Ui hint: patterns this one extends.
Definition: Pattern.cc:223
DEFINE_PTR_TYPE(Application)
Pattern interface.
Definition: Pattern.h:30
ResTraits< Self > TraitsType
Definition: Pattern.h:34
Contents dependsNoSuggests() const
Definition: Pattern.h:87
bool isDefault() const
Definition: Pattern.cc:180
Contents core() const
Ui hint: Required Packages.
Definition: Pattern.cc:240
Base for resolvable objects.
Definition: ResObject.h:38
TraitsType::constPtrType constPtr
Definition: Pattern.h:36
intrusive_ptr< TRes > PtrType
Definition: ResTraits.h:82
'Language[_Country]' codes.
Definition: Locale.h:49
virtual ~Pattern()
Dtor.
Definition: Pattern.cc:177
Contents contents(bool includeSuggests_r=true) const
The collection of packages associated with this pattern.
Definition: Pattern.cc:284
NameList includes() const
Ui hint: included patterns.
Definition: Pattern.cc:220
Contents depends(bool includeSuggests_r=true) const
Ui hint: Dependent packages.
Definition: Pattern.cc:258
Pattern(const sat::Solvable &solvable_r)
Ctor.
Definition: Pattern.cc:173
std::string category(const Locale &lang_r=Locale()) const
Definition: Pattern.cc:192
Solvable set wrapper to allow adding additioanal convenience iterators.
Definition: SolvableSet.h:35