libyui
YRpmGroupsTree.h
1 /*
2  Copyright (C) 2000-2012 Novell, Inc
3  This library is free software; you can redistribute it and/or modify
4  it under the terms of the GNU Lesser General Public License as
5  published by the Free Software Foundation; either version 2.1 of the
6  License, or (at your option) version 3.0 of the License. This library
7  is distributed in the hope that it will be useful, but WITHOUT ANY
8  WARRANTY; without even the implied warranty of MERCHANTABILITY or
9  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10  License for more details. You should have received a copy of the GNU
11  Lesser General Public License along with this library; if not, write
12  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13  Floor, Boston, MA 02110-1301 USA
14 */
15 
16 
17 /*-/
18 
19  File: YRpmGroupsTree.h
20 
21  Author: Stefan Hundhammer <shundhammer@suse.de>
22 
23 /-*/
24 
25 #ifndef YRpmGroupsTree_h
26 #define YRpmGroupsTree_h
27 
28 
29 #include "YStringTree.h"
30 
31 
32 // This has been declared obsolete quite some time ago (2/2020), but it is
33 // still used in libyui-gtk-pkg.
34 //
35 // Once it is no longer used there, remove this class and also YStringTree and
36 // YTransText.
37 //
38 // -- shundhammer 2020-02-03
39 
40 
46 #ifndef SUPPRESS_YRPMGROUPSTREE_OBSOLETE_WARNING
47 # warning The YRpmGroupsTree class is obsolete. DO NOT USE ANYMORE.
48 #endif
50 {
51 public:
52 
54  virtual ~YRpmGroupsTree();
55  YStringTreeItem * addRpmGroup( const std::string & rpmGroup )
56  { return 0; }
57 
58  std::string rpmGroup( const YStringTreeItem * node )
59  { return origPath( node, '/', false ); }
60 
61  std::string translatedRpmGroup( const YStringTreeItem * node )
62  { return translatedPath( node, '/', false ); }
63 
64  void addFallbackRpmGroups();
65 };
66 
67 
68 
69 #endif // YRpmGroupsTree_h
Definition: YRpmGroupsTree.h:49
Definition: TreeItem.h:191
Definition: YStringTree.h:41
std::string translatedPath(const YStringTreeItem *item, char delimiter, bool startWithDelimiter=true)
Definition: YStringTree.h:108
std::string origPath(const YStringTreeItem *item, char delimiter, bool startWithDelimiter=true)
Definition: YStringTree.h:97