ignore
[platform/upstream/libzypp.git] / zypp / Language.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/Language.h
10  *
11 */
12 #ifndef ZYPP_LANGUAGE_H
13 #define ZYPP_LANGUAGE_H
14
15 #include "zypp/ResObject.h"
16 #include "zypp/Locale.h"
17
18 ///////////////////////////////////////////////////////////////////
19 namespace zypp
20 { /////////////////////////////////////////////////////////////////
21
22   DEFINE_PTR_TYPE(Language);
23
24   ///////////////////////////////////////////////////////////////////
25   namespace detail
26   { /////////////////////////////////////////////////////////////////
27
28     ///////////////////////////////////////////////////////////////////
29     //
30     //  CLASS NAME : LanguageImplIf
31     //
32     /** Exposition only. */
33     class LanguageImplIf : public ResObjectImplIf
34     {
35     public:
36       typedef Language ResType;
37     };
38     ///////////////////////////////////////////////////////////////////
39
40     /////////////////////////////////////////////////////////////////
41   } // namespace detail
42   ///////////////////////////////////////////////////////////////////
43
44   ///////////////////////////////////////////////////////////////////
45   //
46   //    CLASS NAME : Language
47   //
48   /** Language interface.
49   */
50   class Language : public ResObject
51   {
52   public:
53     typedef detail::LanguageImplIf   Impl;
54     typedef Language                 Self;
55     typedef ResTraits<Self>          TraitsType;
56     typedef TraitsType::PtrType      Ptr;
57     typedef TraitsType::constPtrType constPtr;
58
59     /** Installed Language instance. */
60     static Ptr installedInstance( const Locale & locale_r );
61     /** Available Language instance. */
62     static Ptr availableInstance( const Locale & locale_r );
63
64   protected:
65     /** Ctor */
66     Language( const NVRAD & nvrad_r );
67     /** Dtor */
68     virtual ~Language();
69
70   private:
71     /** Access implementation */
72     virtual Impl & pimpl() = 0;
73     /** Access implementation */
74     virtual const Impl & pimpl() const = 0;
75   };
76   ///////////////////////////////////////////////////////////////////
77
78   /////////////////////////////////////////////////////////////////
79 } // namespace zypp
80 ///////////////////////////////////////////////////////////////////
81 #endif // ZYPP_LANGUAGE_H