/
Pattern.h
88 lines (75 loc) · 2.67 KB
/
Pattern.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*---------------------------------------------------------------------\
| ____ _ __ __ ___ |
| |__ / \ / / . \ . \ |
| / / \ V /| _/ _/ |
| / /__ | | | | | | |
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
/** \file zypp/Pattern.h
*
*/
#ifndef ZYPP_PATTERN_H
#define ZYPP_PATTERN_H
#include "zypp/ResObject.h"
#include "zypp/Pathname.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
DEFINE_PTR_TYPE(Pattern);
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : Pattern
//
/** Pattern interface.
*/
class Pattern : public ResObject
{
public:
typedef Pattern Self;
typedef ResTraits<Self> TraitsType;
typedef TraitsType::PtrType Ptr;
typedef TraitsType::constPtrType constPtr;
public:
typedef sat::ArrayAttr<IdString,IdString> NameList;
typedef sat::SolvableSet Contents;
public:
/** */
bool isDefault() const;
/** */
bool userVisible() const;
/** */
std::string category( const Locale & lang_r = Locale() ) const;
/** */
Pathname icon() const;
/** */
Pathname script() const;
/** */
std::string order() const;
public:
/** Ui hint: included patterns. */
NameList includes() const;
/** Ui hint: patterns this one extends. */
NameList extends() const;
/** Ui hint: Required Packages. */
Contents core() const;
/** Ui hint: Dependent packages.
* This also includes recommended and suugested packages.
*/
Contents depends() const;
/** The collection of packages associated with this pattern.
* This also evaluates the patterns includes/extends relation.
*/
Contents contents() const;
protected:
friend Ptr make<Self>( const sat::Solvable & solvable_r );
/** Ctor */
Pattern( const sat::Solvable & solvable_r );
/** Dtor */
virtual ~Pattern();
};
///////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
#endif // ZYPP_PATTERN_H