libzypp: zypp::Dep Struct Reference

libzypp 17.38.14

zypp::Dep Struct Reference
Enumeration Class

Enumeration class of dependency types. More...

`#include <zypp/Dep.h>`

## Friends
bool | operator== (const Dep &lhs, const Dep &rhs)
| relates: Dep
bool | operator!= (const Dep &lhs, const Dep &rhs)
| relates: Dep
bool | operator< (const Dep &lhs, const Dep &rhs)
| Arbitrary order to allow Dep as key in std::container.

## Dependency types
These are the real dependency type contants to use. Don't mind that it's not an enum. See also zypp::Dep::inSwitch
enum | for_use_in_switch { PROVIDES_e , PREREQUIRES_e , REQUIRES_e , CONFLICTS_e , OBSOLETES_e , RECOMMENDS_e , SUGGESTS_e , ENHANCES_e , SUPPLEMENTS_e }
| Enumarators provided only for use inSwitch statement. More...
static const Dep PROVIDES | ZYPP_API
static const Dep PREREQUIRES | ZYPP_API
static const Dep REQUIRES | ZYPP_API
static const Dep CONFLICTS | ZYPP_API
static const Dep OBSOLETES | ZYPP_API
static const Dep RECOMMENDS | ZYPP_API
static const Dep SUGGESTS | ZYPP_API
static const Dep ENHANCES | ZYPP_API
static const Dep SUPPLEMENTS | ZYPP_API
for_use_in_switch | _type
| The operator.
| Dep (const std::string &strval_r)
| Ctor from string.
const std::string & | asString () const ZYPP_API
| String representation of dependency type.
std::string | asUserString () const ZYPP_API
| Translated dependency type (capitalized).
for_use_in_switch | inSwitch () const
| Enumarator provided for use in `switch` statement.
| Dep (for_use_in_switch type_r)
| Ctor to initialize the dependency type contants.

## Detailed Description

Enumeration class of dependency types.

Definition at line 30 of file Dep.h.

## Member Enumeration Documentation

## ◆ for_use_in_switch

enum zypp::Dep::for_use_in_switch

Enumarators provided only for use inSwitch statement.

See also
  inSwitch

Enumerator
PROVIDES_e |
PREREQUIRES_e |
REQUIRES_e |
CONFLICTS_e |
OBSOLETES_e |
RECOMMENDS_e |
SUGGESTS_e |
ENHANCES_e |
SUPPLEMENTS_e |

Definition at line 57 of file Dep.h.

## Constructor & Destructor Documentation

## ◆ Dep() [1/2]

zypp::Dep::Dep | ( | const std::string & | strval_r | ) |
| explicit

Ctor from string.

Legal values for strval_r are the constants names (case insignificant).

Exceptions

  PARSE | if strval_r is not legal.

Todo
  refine exceptions and check throw.

Definition at line 67 of file Dep.cc.

## ◆ Dep() [2/2]

zypp::Dep::Dep | ( | for_use_in_switch | type_r | ) |
| inlineprivate

Ctor to initialize the dependency type contants.

Definition at line 95 of file Dep.h.

## Member Function Documentation

## ◆ asString()

const std::string & zypp::Dep::asString | ( |  | ) | const

String representation of dependency type.

Returns
  The constants names lowercased.

Definition at line 76 of file Dep.cc.

## ◆ asUserString()

std::string zypp::Dep::asUserString | ( |  | ) | const

Translated dependency type (capitalized).

Returns
  The capitalized constants names translated.

Definition at line 92 of file Dep.cc.

## ◆ inSwitch()

for_use_in_switch zypp::Dep::inSwitch | ( |  | ) | const
| inline

Enumarator provided for use in `switch` statement.

Definition at line 90 of file Dep.h.

## Friends And Related Symbol Documentation

## ◆ operator==

bool operator== | ( | const Dep & | lhs,
|  | const Dep & | rhs )
| friend

relates: Dep

Definition at line 110 of file Dep.h.

## ◆ operator!=

bool operator!= | ( | const Dep & | lhs,
|  | const Dep & | rhs )
| friend

relates: Dep

Definition at line 114 of file Dep.h.

## ◆ operator<

bool operator< | ( | const Dep & | lhs,
|  | const Dep & | rhs )
| friend

Arbitrary order to allow Dep as key in std::container.

Definition at line 118 of file Dep.h.

## Member Data Documentation

## ◆ ZYPP_API [1/9]

const Dep PROVIDES zypp::Dep::ZYPP_API
| static

Definition at line 43 of file Dep.h.

## ◆ ZYPP_API [2/9]

const Dep PREREQUIRES zypp::Dep::ZYPP_API
| static

Definition at line 44 of file Dep.h.

## ◆ ZYPP_API [3/9]

const Dep REQUIRES zypp::Dep::ZYPP_API
| static

Definition at line 45 of file Dep.h.

## ◆ ZYPP_API [4/9]

const Dep CONFLICTS zypp::Dep::ZYPP_API
| static

Definition at line 46 of file Dep.h.

## ◆ ZYPP_API [5/9]

const Dep OBSOLETES zypp::Dep::ZYPP_API
| static

Definition at line 47 of file Dep.h.

## ◆ ZYPP_API [6/9]

const Dep RECOMMENDS zypp::Dep::ZYPP_API
| static

Definition at line 48 of file Dep.h.

## ◆ ZYPP_API [7/9]

const Dep SUGGESTS zypp::Dep::ZYPP_API
| static

Definition at line 49 of file Dep.h.

## ◆ ZYPP_API [8/9]

const Dep ENHANCES zypp::Dep::ZYPP_API
| static

Definition at line 50 of file Dep.h.

## ◆ ZYPP_API [9/9]

const Dep SUPPLEMENTS zypp::Dep::ZYPP_API
| static

Definition at line 51 of file Dep.h.

## ◆ _type

for_use_in_switch zypp::Dep::_type
| private

The operator.

Definition at line 99 of file Dep.h.

The documentation for this struct was generated from the following files:

- zypp/Dep.h
- zypp/Dep.cc