- Create the cache directly from the schema (installed) file.
[platform/upstream/libzypp.git] / zypp / Selection.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/Selection.h
10  *
11 */
12 #ifndef ZYPP_SELECTION_H
13 #define ZYPP_SELECTION_H
14
15 #include "zypp/ResObject.h"
16 #include "zypp/detail/SelectionImplIf.h"
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21
22   DEFINE_PTR_TYPE(Selection);
23
24   ///////////////////////////////////////////////////////////////////
25   //
26   //    CLASS NAME : Selection
27   //
28   /** Selection interface.
29   */
30   class Selection : public ResObject
31   {
32   public:
33     typedef detail::SelectionImplIf  Impl;
34     typedef Selection                Self;
35     typedef ResTraits<Self>          TraitsType;
36     typedef TraitsType::PtrType      Ptr;
37     typedef TraitsType::constPtrType constPtr;
38
39   public:
40     /** selection category */
41     Label category() const;
42     inline bool isBase() const
43     { return category() == "baseconf"; }
44
45     /** selection visibility (for hidden selections) */
46     bool visible() const;
47
48     /** selection presentation order */
49     Label order() const;
50
51     const std::set<std::string> install_packages( const Locale & lang = Locale("") ) const;
52
53   protected:
54     /** Ctor */
55     Selection( const NVRAD & nvrad_r );
56     /** Dtor */
57     virtual ~Selection();
58
59   private:
60     /** Access implementation */
61     virtual Impl & pimpl() = 0;
62     /** Access implementation */
63     virtual const Impl & pimpl() const = 0;
64   };
65   ///////////////////////////////////////////////////////////////////
66
67   /////////////////////////////////////////////////////////////////
68 } // namespace zypp
69 ///////////////////////////////////////////////////////////////////
70 #endif // ZYPP_SELECTION_H