libzypp
11.13.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
RepoType.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
9
10
#ifndef ZYPP_REPO_TYPE_H_
11
#define ZYPP_REPO_TYPE_H_
12
13
#include <iosfwd>
14
#include <string>
15
16
namespace
zypp
17
{
18
namespace
repo
19
{
20
27
struct
RepoType
28
{
29
static
const
RepoType
RPMMD
;
30
static
const
RepoType
YAST2
;
31
static
const
RepoType
RPMPLAINDIR
;
32
static
const
RepoType
NONE
;
33
34
enum
Type
35
{
36
NONE_e
,
37
RPMMD_e
,
38
YAST2_e
,
39
RPMPLAINDIR_e
,
40
};
41
42
RepoType
() :
_type
(
NONE_e
) {}
43
44
RepoType
(
Type
type) :
_type
(type) {}
45
46
explicit
RepoType
(
const
std::string & strval_r);
47
48
Type
toEnum
()
const
{
return
_type
; }
49
50
RepoType::Type
parse
(
const
std::string & strval_r);
51
52
const
std::string &
asString
()
const
;
53
54
Type
_type
;
55
};
56
57
58
inline
std::ostream &
operator<<
( std::ostream & str,
const
RepoType
& obj )
59
{
return
str << obj.
asString
(); }
60
61
inline
bool
operator==
(
const
RepoType
& obj1,
const
RepoType
& obj2)
62
{
return
obj1.
_type
== obj2.
_type
; }
63
64
inline
bool
operator!=
(
const
RepoType
& obj1,
const
RepoType
& obj2)
65
{
return
! (obj1 == obj2); }
66
67
}
// ns repo
68
}
// ns zypp
69
70
#endif
71
72
// vim: set ts=2 sts=2 sw=2 et ai:
zypp
repo
RepoType.h
Generated by
1.8.1