1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/NeedAType.h
12 #ifndef ZYPP_NEEDATYPE_H
13 #define ZYPP_NEEDATYPE_H
19 #include "zypp/Locale.h"
21 ///////////////////////////////////////////////////////////////////
23 { /////////////////////////////////////////////////////////////////
24 /** \defgroup NEEDATYPE Wishlist of types
26 Whenever you find something that might be worth being a
27 type, and not just an \c unsigned or \c string. Keep it here.
29 Start with a resonable \c typedef or \c class draft, so you
30 can start using the type within the implementation. If you're
31 in need for interface methods, add them to the draft. Think about
32 the interface and expected behaviour, but implement \b here just
33 as much as you actually need.
35 Goal is to provide a real class for it, or to find out that a
36 typedef is sufficient, ot the type is not needed anyway.
38 If you already implemented something which would fit into this
39 group, but don't want to move it here, put doxygens
40 \code \ingroup NEEDATYPE \endcode tag in it's comment. So it will
41 at least appear in the doc.
43 \note Don't put stuff here, that's (almost) ready to use. This is
44 not meant to be a convenience include. Goal is to have this file empty.
49 /** Single line of (human readable) text.
50 probabely sufficient as typedef. we may use it to classify the
51 various strings and string lists within resolvable and other classes.
52 More a hint to the UI describing the purpose of the string. */
53 typedef std::string Label;
55 /** Single line of (human readable) text. See Label. A description would
56 Text, while a a packages file list would be list<string> */
57 typedef std::list<std::string> Text;
59 /** Offer a License text and methods to remember confirmation. */
60 typedef std::list<std::string> License;
62 /** An rpm package group value. Also provide acces to a
63 * (singleton) tree like group hierarchy which contains
64 * all existing groups. No more need to fiddle with YStringTreeItem
65 * classes and forgetting to add parsed groups there for use in the UI.
66 * PackageGroup can be selforganizing.
68 typedef std::string PackageGroup;
70 /** Candidate for string unification? */
71 typedef std::list<std::string> PackageKeywords;
73 /** Vendor. Worth a typedef. Maybe a class unifying the strings. */
74 typedef std::string Vendor;
76 /** Handle data depending on a locale. Translated strings, maybe
79 struct MultiLocale : public std::map<Locale,_Val>
82 /** stream reading compessed or uncompress files */
83 typedef std::ifstream ifgzstream;
85 /** stream writing compessed or uncompress files */
86 typedef std::ofstream ofgzstream;
89 /////////////////////////////////////////////////////////////////
91 ///////////////////////////////////////////////////////////////////
92 #endif // ZYPP_NEEDATYPE_H