- Added template class base::KindOf<Type>
[platform/upstream/libzypp.git] / zypp / ResObject.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/ResObject.h
10  *
11 */
12 #ifndef ZYPP_RESOBJECT_H
13 #define ZYPP_RESOBJECT_H
14
15 #include "zypp/Resolvable.h"
16 #include "zypp/detail/ResObjectImplIf.h"
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21
22   ///////////////////////////////////////////////////////////////////
23   //
24   //    CLASS NAME : ResObject
25   //
26   /** Interface base for resolvable objects (common data).
27   */
28   class ResObject : public Resolvable
29   {
30   public:
31     typedef detail::ResObjectImplIf  Impl;
32     typedef ResObject                Self;
33     typedef ResTraits<Self>          TraitsType;
34     typedef TraitsType::PtrType      Ptr;
35     typedef TraitsType::constPtrType constPtr;
36
37   public:
38     /** */
39     line summary() const;
40     /** */
41     text description() const;
42
43   protected:
44     /** Ctor */
45     ResObject( const Kind & kind_r,
46                const std::string & name_r,
47                const Edition & edition_r,
48                const Arch & arch_r );
49     /** Dtor */
50     virtual ~ResObject();
51
52   private:
53     /** Access implementation */
54     virtual Impl & pimpl() = 0;
55     /** Access implementation */
56     virtual const Impl & pimpl() const = 0;
57   };
58   ///////////////////////////////////////////////////////////////////
59
60   /////////////////////////////////////////////////////////////////
61 } // namespace zypp
62 ///////////////////////////////////////////////////////////////////
63 #endif // ZYPP_RESOBJECT_H