29277c86fab4acf3625ff46f2d491c44b096d1a5
[platform/upstream/libzypp.git] / zypp / Pattern.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/Pattern.h
10  *
11 */
12 #ifndef ZYPP_PATTERN_H
13 #define ZYPP_PATTERN_H
14
15 #include "zypp/ResObject.h"
16 #include "zypp/Pathname.h"
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21
22   DEFINE_PTR_TYPE(Pattern);
23
24   ///////////////////////////////////////////////////////////////////
25   //
26   //    CLASS NAME : Pattern
27   //
28   /** Pattern interface.
29   */
30   class Pattern : public ResObject
31   {
32   public:
33     typedef Pattern                  Self;
34     typedef ResTraits<Self>          TraitsType;
35     typedef TraitsType::PtrType      Ptr;
36     typedef TraitsType::constPtrType constPtr;
37
38   public:
39     /** */
40     bool isDefault() const;
41     /** */
42     bool userVisible() const;
43     /** */
44     std::string category( const Locale & lang_r = Locale() ) const;
45     /** */
46     Pathname icon() const;
47     /** */
48     Pathname script() const;
49     /** */
50     std::string order() const;
51
52     /** Ui hint. */
53     const Capabilities & includes() const;
54     /** Ui hint. */
55     const Capabilities & extends() const;
56
57   protected:
58     friend Ptr make<Self>( const sat::Solvable & solvable_r );
59     /** Ctor */
60     Pattern( const sat::Solvable & solvable_r );
61     /** Dtor */
62     virtual ~Pattern();
63   };
64   ///////////////////////////////////////////////////////////////////
65
66   /////////////////////////////////////////////////////////////////
67 } // namespace zypp
68 ///////////////////////////////////////////////////////////////////
69 #endif // ZYPP_PATTERN_H