libzypp
11.13.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ServiceType.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
9
10
#ifndef ZYPP_SERVICE_TYPE_H_
11
#define ZYPP_SERVICE_TYPE_H_
12
13
#include <iosfwd>
14
#include <string>
15
16
namespace
zypp
17
{
18
namespace
repo
19
{
20
26
struct
ServiceType
27
{
32
static
const
ServiceType
RIS
;
34
static
const
ServiceType
NONE
;
43
static
const
ServiceType
PLUGIN
;
44
45
enum
Type
46
{
47
NONE_e
,
48
RIS_e
,
49
PLUGIN_e
,
50
};
51
52
ServiceType
() :
_type
(
NONE_e
) {}
53
54
ServiceType
(
Type
type) :
_type
(type) {}
55
56
explicit
ServiceType
(
const
std::string & strval_r);
57
58
Type
toEnum
()
const
{
return
_type
; }
59
60
ServiceType::Type
parse
(
const
std::string & strval_r);
61
62
const
std::string &
asString
()
const
;
63
64
Type
_type
;
65
};
66
67
68
inline
std::ostream &
operator<<
( std::ostream & str,
const
ServiceType
& obj )
69
{
return
str << obj.
asString
(); }
70
71
inline
bool
operator==
(
const
ServiceType
& obj1,
const
ServiceType
& obj2)
72
{
return
obj1.
_type
== obj2.
_type
; }
73
74
inline
bool
operator!=
(
const
ServiceType
& obj1,
const
ServiceType
& obj2)
75
{
return
! (obj1 == obj2); }
76
77
78
}
// ns repo
79
}
// ns zypp
80
81
#endif
/* ZYPP_SERVICE_TYPE_H_ */
82
83
// vim: set ts=2 sts=2 sw=2 et ai:
zypp
repo
ServiceType.h
Generated by
1.8.1