1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/Pattern.h
12 #ifndef ZYPP_PATTERN_H
13 #define ZYPP_PATTERN_H
15 #include "zypp/ResObject.h"
16 #include "zypp/Pathname.h"
18 ///////////////////////////////////////////////////////////////////
20 { /////////////////////////////////////////////////////////////////
22 DEFINE_PTR_TYPE(Pattern);
24 ///////////////////////////////////////////////////////////////////
26 // CLASS NAME : Pattern
28 /** Pattern interface.
30 class Pattern : public ResObject
34 typedef ResTraits<Self> TraitsType;
35 typedef TraitsType::PtrType Ptr;
36 typedef TraitsType::constPtrType constPtr;
39 typedef sat::ArrayAttr<IdString,IdString> NameList;
40 typedef sat::SolvableSet Contents;
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;
57 /** Ui hint: included patterns. */
58 NameList includes() const;
60 /** Ui hint: patterns this one extends. */
61 NameList extends() const;
63 /** Ui hint: Required Packages. */
64 Contents core() const;
66 /** Ui hint: Dependent packages.
67 * This also includes recommended and suugested packages.
69 Contents depends() const;
71 /** The collection of packages associated with this pattern.
72 * This also evaluates the patterns includes/extends relation.
74 Contents contents() const;
77 friend Ptr make<Self>( const sat::Solvable & solvable_r );
79 Pattern( const sat::Solvable & solvable_r );
83 ///////////////////////////////////////////////////////////////////
85 /////////////////////////////////////////////////////////////////
87 ///////////////////////////////////////////////////////////////////
88 #endif // ZYPP_PATTERN_H