libzypp  13.10.6
zypp::Dep Struct Reference

Enumeration class of dependency types. More...

#include <Dep.h>

Public Types

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...
 

Public Member Functions

 Dep (const std::string &strval_r)
 Ctor from string. More...
 
const std::string & asString () const
 String representation of dependency type. More...
 
for_use_in_switch inSwitch () const
 Enumarator provided for use in switch statement. More...
 

Static Public Attributes

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
static const Dep PROVIDES
 
static const Dep PREREQUIRES
 
static const Dep REQUIRES
 
static const Dep CONFLICTS
 
static const Dep OBSOLETES
 
static const Dep RECOMMENDS
 
static const Dep SUGGESTS
 
static const Dep ENHANCES
 
static const Dep SUPPLEMENTS
 

Private Member Functions

 Dep (for_use_in_switch type_r)
 Ctor to initialize the dependency type contants. More...
 

Private Attributes

for_use_in_switch _type
 The operator. More...
 

Friends

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

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const Dep &obj)
 
bool operator== (const Dep &lhs, const Dep &rhs)
 
bool operator!= (const Dep &lhs, const Dep &rhs)
 
bool operator< (const Dep &lhs, const Dep &rhs)
 

Detailed Description

Enumeration class of dependency types.

Definition at line 29 of file Dep.h.

Member Enumeration Documentation

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 56 of file Dep.h.

Constructor & Destructor Documentation

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

Ctor from string.

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

Exceptions
PARSEif strval_r is not legal.
Todo:
refine exceptions and check throw.

Definition at line 72 of file Dep.cc.

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

Ctor to initialize the dependency type contants.

Definition at line 89 of file Dep.h.

Member Function Documentation

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

String representation of dependency type.

Returns
The constants names lowercased.

Definition at line 81 of file Dep.cc.

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

Enumarator provided for use in switch statement.

Definition at line 84 of file Dep.h.

Friends And Related Function Documentation

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

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

std::ostream & operator<< ( std::ostream &  str,
const Dep obj 
)
related

Stream output

Definition at line 98 of file Dep.h.

bool operator== ( const Dep lhs,
const Dep rhs 
)
related

Definition at line 104 of file Dep.h.

bool operator!= ( const Dep lhs,
const Dep rhs 
)
related

Definition at line 108 of file Dep.h.

bool operator< ( const Dep lhs,
const Dep rhs 
)
related

Definition at line 112 of file Dep.h.

Member Data Documentation

const Dep zypp::Dep::PROVIDES
static

Definition at line 42 of file Dep.h.

const Dep zypp::Dep::PREREQUIRES
static

Definition at line 43 of file Dep.h.

const Dep zypp::Dep::REQUIRES
static

Definition at line 44 of file Dep.h.

const Dep zypp::Dep::CONFLICTS
static

Definition at line 45 of file Dep.h.

const Dep zypp::Dep::OBSOLETES
static

Definition at line 46 of file Dep.h.

const Dep zypp::Dep::RECOMMENDS
static

Definition at line 47 of file Dep.h.

const Dep zypp::Dep::SUGGESTS
static

Definition at line 48 of file Dep.h.

const Dep zypp::Dep::ENHANCES
static

Definition at line 49 of file Dep.h.

const Dep zypp::Dep::SUPPLEMENTS
static

Definition at line 50 of file Dep.h.

for_use_in_switch zypp::Dep::_type
private

The operator.

Definition at line 93 of file Dep.h.


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