Fixed pattern includes and extends attributes.
[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/detail/PatternImplIf.h"
17 #include "zypp/Pathname.h"
18
19 ///////////////////////////////////////////////////////////////////
20 namespace zypp
21 { /////////////////////////////////////////////////////////////////
22
23   DEFINE_PTR_TYPE(Pattern);
24
25   ///////////////////////////////////////////////////////////////////
26   //
27   //    CLASS NAME : Pattern
28   //
29   /** Pattern interface.
30   */
31   class Pattern : public ResObject
32   {
33   public:
34     typedef detail::PatternImplIf  Impl;
35     typedef Pattern                Self;
36     typedef ResTraits<Self>          TraitsType;
37     typedef TraitsType::PtrType      Ptr;
38     typedef TraitsType::constPtrType constPtr;
39
40   public:
41     /** */
42     bool isDefault() const;
43     /** */
44     bool userVisible() const;
45     /** */
46     std::string category() const;
47     /** */
48     Pathname icon() const;
49     /** */
50     Pathname script() const;
51     /** */
52     Label order() const;
53
54     /** \deprecated AFAIK unused old Selection interface method. */
55     std::set<std::string> install_packages( const Locale & lang = Locale("") ) const ZYPP_DEPRECATED;
56
57     /** Ui hint. */
58     const CapSet & includes() const;
59     /** Ui hint. */
60     const CapSet & extends() const;
61
62   protected:
63     /** Ctor */
64     Pattern( const NVRAD & nvrad_r );
65     /** Dtor */
66     virtual ~Pattern();
67
68   private:
69     /** Access implementation */
70     virtual Impl & pimpl() = 0;
71     /** Access implementation */
72     virtual const Impl & pimpl() const = 0;
73   };
74   ///////////////////////////////////////////////////////////////////
75
76   /////////////////////////////////////////////////////////////////
77 } // namespace zypp
78 ///////////////////////////////////////////////////////////////////
79 #endif // ZYPP_PATTERN_H