libyui
2.42.5
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Enumerations
Friends
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 <sh@suse.de>
22
23
/-*/
24
25
#ifndef YRpmGroupsTree_h
26
#define YRpmGroupsTree_h
27
28
29
#include "YStringTree.h"
30
31
32
/**
33
* Efficient storage for RPM group tags
34
**/
35
class
YRpmGroupsTree
:
public
YStringTree
36
{
37
public
:
38
39
/**
40
* Constructor.
41
**/
42
43
YRpmGroupsTree
();
44
45
/**
46
* Destructor.
47
**/
48
virtual
~YRpmGroupsTree
();
49
50
/**
51
* Insert an RPM group into this tree if not already present.
52
* Splits the RPM group string ("abc/def/ghi") and creates tree items for
53
* each level as required.
54
* Returns the tree entry for this RPM group.
55
**/
56
YStringTreeItem
*
addRpmGroup
(
const
std::string &
rpmGroup
)
57
{
return
addBranch
( rpmGroup,
'/'
); }
58
59
/**
60
* Returns the complete (untranslated) RPM group tag string for 'node'.
61
**/
62
std::string
rpmGroup
(
const
YStringTreeItem
* node )
63
{
return
origPath
( node,
'/'
,
false
); }
64
65
/**
66
* Returns the complete translated RPM group tag string for 'node'.
67
**/
68
std::string
translatedRpmGroup
(
const
YStringTreeItem
* node )
69
{
return
translatedPath
( node,
'/'
,
false
); }
70
71
/**
72
* Add a predefined set of RPM groups
73
**/
74
void
addFallbackRpmGroups
();
75
};
76
77
78
79
#endif // YRpmGroupsTree_h
src
YRpmGroupsTree.h
Generated by
1.8.3