libzypp 17.31.23
|
WFN attribute value. More...
#include <CpeId.h>
Classes | |
struct | ETypeDef |
Classification of Value types mostly for match (use like 'enum class Type') More... | |
struct | FsFormatType |
Indicator type for ctor arg in FS format. More... | |
struct | UriFormatType |
Indicator type for ctor arg in URI format. More... | |
Public Types | |
typedef base::EnumClass< ETypeDef > | Type |
'enum class Type' | |
Public Member Functions | |
Value () | |
Default ctor: ANY. | |
Value (const std::string &value_r) | |
Ctor from string (WFN format; "*" represents ANY; "" represents NA) | |
Value (const char *value_r) | |
Ctor from char* (WFN format; nullptr or "*" represent ANY; "" represents NA) | |
Value (const std::string &encoded_r, FsFormatType) | |
Ctor from string (FS format, "*" represents ANY; "-" represents NA) | |
Value (const std::string &encoded_r, UriFormatType) | |
Ctor from string (URI format, "" represents ANY; "-" represents NA) | |
Type | type () const |
Return the Type of this Value. | |
bool | isANY () const |
Whether value is ANY. | |
bool | isNA () const |
Whether value is NA. | |
bool | isLogical () const |
Whether it's a logical value (ANY|NA). | |
bool | isLogical (Type type_r) const |
bool | isString () const |
Whether it's an attribute value string (not logical value). | |
bool | isString (Type type_r) const |
bool | isWildcardfree () const |
An attribute value string without wildcards ([*?] at begin and/or end) | |
bool | isWildcarded () const |
An attribute value string with wildcards ([*?] at begin and/or end) | |
std::string | asString () const |
Default string representation [asWfn]. | |
std::string | asWfn () const |
String representation as in Well-Formed-Name (ANY:"*", NA:""). | |
std::string | asFs () const |
String representation as in Formated-String (ANY:"*", NA:"-") | |
std::string | asUri () const |
String representation as in URI (ANY:"", NA:"-") | |
Public Member Functions inherited from zypp::base::SetRelationMixin< Value > | |
SetCompare | compare (const Value &trg) const |
Compare sets. | |
SetCompare | compare (const SetRelationMixin< Value > &trg) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | compare (const Value &trg, SetCompare cmp) const |
Compare sets and match against SetCompare. | |
bool | compare (const SetRelationMixin< Value > &trg, SetCompare cmp) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
bool | compare (const Value &trg, SetRelation rel) const |
Compare sets and match against SetRelation. | |
bool | compare (const SetRelationMixin< Value > &trg, SetRelation rel) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Static Public Attributes | |
static const Value | ANY |
Logical value matching ANY value. | |
static const Value | NA |
Logical value indicating “not applicable/not used". | |
static constexpr FsFormatType | fsFormat = FsFormatType() |
Indicator argument for ctor arg in FS format. | |
static constexpr UriFormatType | uriFormat = UriFormatType() |
Indicator argument for ctor arg in URI format. | |
Private Member Functions | |
SetCompare | setRelationMixinCompare (const Value &trg) const |
CPE name matching hook for SetRelationMixin. | |
bool | containsWildcard () const |
HAs unquoted [*?] at begin and/or end of value. | |
Private Attributes | |
RWCOW_pointer< std::string > | _value |
Friends | |
SetCompare | base::SetRelationMixin (const Value &) const |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const CpeId::Value &obj) |
Stream output. | |
Related Functions inherited from zypp::base::SetRelationMixin< Value > | |
SetCompare | compare (const SetRelationMixin< Value > &src, const SetRelationMixin< Value > &trg) |
Compare sets. | |
bool | compare (const SetRelationMixin< Value > &src, const SetRelationMixin< Value > &trg, SetCompare cmp) |
Compare sets and match against SetCompare. | |
bool | compare (const SetRelationMixin< Value > &src, const SetRelationMixin< Value > &trg, SetRelation rel) |
Compare sets and match against SetRelation. | |
bool | operator== (const SetRelationMixin< Value > &src, const SetRelationMixin< Value > &trg) |
Equal. | |
bool | operator!= (const SetRelationMixin< Value > &src, const SetRelationMixin< Value > &trg) |
Unequal. | |
Additional Inherited Members | |
Protected Member Functions inherited from zypp::base::SetRelationMixin< Value > | |
SetRelationMixin () | |
DEFAULT_COPYABLE (SetRelationMixin) | |
DEFAULT_MOVABLE (SetRelationMixin) | |
~SetRelationMixin () | |
WFN attribute value.
Valid WFN string values are not empty, contain alphanumeric chars, underscore, no whitespace, printable non-alphanumeric characters must be quoted by a backslash.
Unescaped asterisk and question mark are special characters and may occur at the beginning and or end of the string. The asterisk must not be used more than once in asequense. The question mark may be used more than once in a sequence.
A single asterisk must not be used as attribute value, nor a single quoted hyphen.
A single question mark may be used as value.
|
explicit |
|
inlineexplicit |
zypp::CpeId::Value::Value | ( | const std::string & | encoded_r, |
FsFormatType | |||
) |
zypp::CpeId::Value::Value | ( | const std::string & | encoded_r, |
UriFormatType | |||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
std::string zypp::CpeId::Value::asWfn | ( | ) | const |
std::string zypp::CpeId::Value::asFs | ( | ) | const |
String representation as in Formated-String (ANY:"*", NA:"-")
std::string zypp::CpeId::Value::asUri | ( | ) | const |
|
private |
CPE name matching hook for SetRelationMixin.
|
private |
HAs unquoted [*?]
at begin and/or end of value.
|
friend |
|
related |
|
static |
|
static |
|
staticconstexpr |
|
staticconstexpr |
|
private |