add order to patterns, also for Mr. Huha integration
[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     std::set<std::string> install_packages( const Locale & lang = Locale("") ) const;
55
56   protected:
57     /** Ctor */
58     Pattern( const NVRAD & nvrad_r );
59     /** Dtor */
60     virtual ~Pattern();
61
62   private:
63     /** Access implementation */
64     virtual Impl & pimpl() = 0;
65     /** Access implementation */
66     virtual const Impl & pimpl() const = 0;
67   };
68   ///////////////////////////////////////////////////////////////////
69
70   /////////////////////////////////////////////////////////////////
71 } // namespace zypp
72 ///////////////////////////////////////////////////////////////////
73 #endif // ZYPP_PATTERN_H