libzypp: zypp::CpeId Class Reference

libzypp 17.38.13

zypp::CpeId Class Reference

Common Platform Enumearation (2.3) See http://cpe.mitre.org/ for more information on the Common Platform Enumearation. More...

`#include <zypp/CpeId.h>`

Inheritance diagram for zypp::CpeId:

## Classes
class | Impl
| CpeId implementation. More...
struct | EAttributeDef
| WFN attributes (use like 'enum class Attribute'). More...
struct | NoThrowType
| Indicator type for non-trowing ctor. More...
class | Value
| WFN attribute value. More...

## Public Types
using | Attribute = base::EnumClass<EAttributeDef>
| 'enum class Attribute'

## Public Member Functions
| CpeId ()
| Default ctor: ANY-Cpeid, all attribute values are ANY.
| CpeId (const std::string &cpe_r)
| Ctor parsing from string representation (empty or URI or FS).
| CpeId (const char *cpe_r)
| Ctor parsing from string representation (empty or URI or FS).
| CpeId (const std::string &cpe_r, NoThrowType)
| Ctor parsing from string (empty or URI or FS, non throwing) Creates an empty CpeId if string is malformed.
| ~CpeId ()
| Dtor.
| operator bool () const
| Evaluate in boolean context: not an ANY-CpeId.
std::string | asString () const
| Default string representation [asFS].
std::string | asFs () const
| String representation as Formated-String (in/out).
std::string | asUri () const
| String representation as URI (in/out).
std::string | asWfn () const
| String representation as Well-Formed-Name (internal format, out only).
Public Member Functions inherited from zypp::base::SetRelationMixin< CpeId >
SetCompare | compare (const CpeId &trg) const
| Compare sets.

## Static Public Attributes
static constexpr NoThrowType | noThrow = NoThrowType()
| Indicator argument for non-trowing ctor.

## Private Member Functions
SetCompare | setRelationMixinCompare (const CpeId &trg) const
| CPE name matching hook for SetRelationMixin.

## Private Attributes
RWCOW_pointer< Impl > | _pimpl
| Implementation class.

## Friends
SetCompare | base::SetRelationMixin (const CpeId &) const

## Additional Inherited Members
Protected Member Functions inherited from zypp::base::SetRelationMixin< CpeId >
| SetRelationMixin ()
| DEFAULT_COPYABLE (SetRelationMixin)
| DEFAULT_MOVABLE (SetRelationMixin)
| ~SetRelationMixin ()

## Detailed Description

Common Platform Enumearation (2.3) See http://cpe.mitre.org/ for more information on the Common Platform Enumearation.

Definition at line 32 of file CpeId.h.

## Member Typedef Documentation

## ◆ Attribute

using zypp::CpeId::Attribute = base::EnumClass<EAttributeDef>

'enum class Attribute'

Definition at line 57 of file CpeId.h.

## Constructor & Destructor Documentation

## ◆ CpeId() [1/4]

zypp::CpeId::CpeId | ( |  | ) |

Default ctor: ANY-Cpeid, all attribute values are ANY.

Definition at line 375 of file CpeId.cc.

## ◆ CpeId() [2/4]

zypp::CpeId::CpeId | ( | const std::string & | cpe_r | ) |
| explicit

Ctor parsing from string representation (empty or URI or FS).

Exceptions

  std::invalid_argument | if string is malformed

Definition at line 379 of file CpeId.cc.

## ◆ CpeId() [3/4]

zypp::CpeId::CpeId | ( | const char * | cpe_r | ) |
| inlineexplicit

Ctor parsing from string representation (empty or URI or FS).

Exceptions

  std::invalid_argument | if string is malformed

Definition at line 77 of file CpeId.h.

## ◆ CpeId() [4/4]

zypp::CpeId::CpeId | ( | const std::string & | cpe_r,
|  | NoThrowType | )

Ctor parsing from string (empty or URI or FS, non throwing) Creates an empty CpeId if string is malformed.

Definition at line 383 of file CpeId.cc.

## ◆ ~CpeId()

zypp::CpeId::~CpeId | ( |  | ) |

Dtor.

Definition at line 397 of file CpeId.cc.

## Member Function Documentation

## ◆ operator bool()

zypp::CpeId::operator bool | ( |  | ) | const
| explicit

Evaluate in boolean context: not an ANY-CpeId.

Definition at line 400 of file CpeId.cc.

## ◆ asString()

std::string zypp::CpeId::asString | ( |  | ) | const
| inline

Default string representation [asFS].

Definition at line 94 of file CpeId.h.

## ◆ asFs()

std::string zypp::CpeId::asFs | ( |  | ) | const

String representation as Formated-String (in/out).

cpe:2.3:a:opensuse:libzypp:14.16.0:beta:*:*:*:*:*:*
a
unsigned short a
Definition mediablocklist.cc:0

Definition at line 403 of file CpeId.cc.

## ◆ asUri()

std::string zypp::CpeId::asUri | ( |  | ) | const

String representation as URI (in/out).

cpe:/a:opensuse:libzypp:14.16.0:beta

Definition at line 406 of file CpeId.cc.

## ◆ asWfn()

std::string zypp::CpeId::asWfn | ( |  | ) | const

String representation as Well-Formed-Name (internal format, out only).

wfn:[part="a",vendor="opensuse",product="libzypp", version="14\.16\.0",update="beta"]

Definition at line 409 of file CpeId.cc.

## ◆ setRelationMixinCompare()

SetCompare zypp::CpeId::setRelationMixinCompare | ( | const CpeId & | trg | ) | const
| private

CPE name matching hook for SetRelationMixin.

Definition at line 412 of file CpeId.cc.

## Friends And Related Symbol Documentation

## ◆ base::SetRelationMixin

SetCompare base::SetRelationMixin | ( | const CpeId & |  | ) | const
| friend

## Member Data Documentation

## ◆ noThrow

CpeId::NoThrowType zypp::CpeId::noThrow = NoThrowType()
| staticconstexpr

Indicator argument for non-trowing ctor.

Definition at line 63 of file CpeId.h.

## ◆ _pimpl

RWCOW_pointer<Impl> zypp::CpeId::_pimpl
| private

Implementation class.

Pointer to implementation.

Definition at line 126 of file CpeId.h.

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

- zypp/CpeId.h
- zypp/CpeId.cc