libzypp
11.13.5
|
String matching option flags as used e.g. More...
#include <StrMatcher.h>
Public Types | |
enum | Mode { NOTHING, STRING, STRINGSTART, STRINGEND, SUBSTRING, GLOB, REGEX, OTHER } |
Mode flags (mutual exclusive). More... |
Public Member Functions | |
Match () | |
Default ctor 0 or NOTHING. | |
Match (Mode val_r) | |
Ctor from Mode value. | |
Match (int val_r) | |
Just in case one needs it. | |
bool | test (const Match &rhs) const |
Test whether all of the rhs bits are set (same mode if rhs has one). | |
bool | testAnyOf (const Match &rhs) const |
Whether at least one of the rhs bits is set (or the same mode). | |
void | set (const Match &rhs) |
Set all of the rhs bits (setting a new mode if rhs has one). | |
void | unset (const Match &rhs) |
Unset all of the rhs bits (unsets mode if the same as rhs). | |
void | turn (const Match &rhs, bool onoff) |
Depending on the value of onoff, set or unset flags. | |
Match & | operator|= (const Match &rhs) |
Add flags. | |
Match & | operator-= (const Match &rhs) |
Remove flags. | |
Mode | mode () const |
Return the mode part. | |
Match | flags () const |
Return the flags part. | |
std::string | asString () const |
String representation. | |
Low level integer representation. | |
int | get () const |
Return the integer representation. | |
int | modeval () const |
Return the modes integer representation. | |
int | flagval () const |
Return the flags integer representation. | |
Mode flag manip/query convenience. | |
bool | isMode (Mode rhs) const |
Whether this has mode rhs. | |
bool | isModeString () const |
Whether this has mode STRING. | |
bool | isModeStringstart () const |
Whether this has mode STRINGSTART. | |
bool | isModeStringend () const |
Whether this has mode STRINGEND. | |
bool | isModeSubstring () const |
Whether this has mode SUBSTRING. | |
bool | isModeGlob () const |
Whether this has mode GLOB. | |
bool | isModeRegex () const |
Whether this has mode REGEX. | |
void | setMode (Mode rhs) |
Set the mode part to rhs . | |
void | setModeString () |
Set the mode STRING. | |
void | setModeStringstart () |
Set the mode STRINGSTART. | |
void | setModeStringend () |
Set the mode STRINGEND. | |
void | setModeSubstring () |
Set the mode SUBSTRING. | |
void | setModeGlob () |
Set the mode GLOB. | |
void | setModeRegex () |
Set the mode REGEX. |
Static Public Attributes | |
\ref Option flags | |
Most flags are actually sat::LookupAttr specific, as they tell how to retrieve the attribute values from solv-files. The plain StrMatcher will ignore those flags and use the ones related to string matching only. | |
static const Match | NOCASE |
If set, match case insensitive. | |
\ref sat::LookupAttr option flags | |
These flags are actually sat::LookupAttr specific, as they tell how to retrieve the attribute values from solv-files. The plain StrMatcher will ignore these flags and use the ones related to string matching only. | |
static const Match | NO_STORAGE_SOLVABLE |
LookupAttr: internal. | |
static const Match | SUB |
LookupAttr: internal. | |
static const Match | ARRAYSENTINEL |
LookupAttr: internal. | |
static const Match | DISABLED_REPOS |
LookupAttr: internal. | |
static const Match | COMPLETE_FILELIST |
LookupAttr: internal. | |
static const Match | SKIP_KIND |
LookupAttr: skip any kind: prefix when looking at a Solvable name. | |
static const Match | FILES |
LookupAttr: match full path when matching in filelists, otherwise just the basenames. | |
static const Match | CHECKSUMS |
LookupAttr: also look for matches in checksums. |
Private Member Functions | |
friend | base::SafeBool () const |
bool | boolTest () const |
![]() | |
operator bool_type () const | |
~SafeBool () |
Static Private Member Functions | |
static int | modeval (Mode mode_r) |
Numeric value for enum (short for Match(m).get() ). |
Private Attributes | |
int | _val |
Static Private Attributes | |
static const int | _modemask = SEARCH_STRINGMASK |
static const int | _flagmask = ~_modemask |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator== (const Match &lhs, const Match &rhs) |
bool | operator!= (const Match &lhs, const Match &rhs) |
Match | operator| (const Match &lhs, const Match &rhs) |
Match | operator| (Match::Mode lhs, Match::Mode rhs) |
Match | operator- (const Match &lhs, const Match &rhs) |
Match | operator- (Match::Mode lhs, Match::Mode rhs) |
std::ostream & | operator<< (std::ostream &str, const Match &obj) |
String matching option flags as used e.g.
by StrMatcher.
Definition at line 33 of file StrMatcher.h.
enum zypp::Match::Mode |
|
inline |
Default ctor 0
or NOTHING.
Definition at line 82 of file StrMatcher.h.
|
inline |
Ctor from Mode value.
Definition at line 87 of file StrMatcher.h.
|
inlineexplicit |
Just in case one needs it.
Definition at line 92 of file StrMatcher.h.
|
inline |
Test whether all
of the rhs bits are set (same mode if rhs has one).
Definition at line 103 of file StrMatcher.h.
|
inline |
Whether at least one of the rhs bits is set (or the same mode).
Definition at line 107 of file StrMatcher.h.
|
inline |
Set all of the rhs bits (setting a new mode if rhs has one).
Definition at line 111 of file StrMatcher.h.
|
inline |
Unset all of the rhs bits (unsets mode if the same as rhs).
Definition at line 120 of file StrMatcher.h.
|
inline |
Depending on the value of onoff, set or unset flags.
Definition at line 129 of file StrMatcher.h.
Add flags.
Definition at line 133 of file StrMatcher.h.
Remove flags.
Definition at line 137 of file StrMatcher.h.
Match::Mode zypp::Match::mode | ( | ) | const |
Return the mode
part.
Definition at line 51 of file StrMatcher.cc.
|
inline |
Return the flags
part.
Definition at line 145 of file StrMatcher.h.
|
inline |
Return the integer representation.
Definition at line 152 of file StrMatcher.h.
|
inline |
Return the modes integer representation.
Definition at line 154 of file StrMatcher.h.
|
inline |
Return the flags integer representation.
Definition at line 156 of file StrMatcher.h.
|
inline |
Whether this has mode rhs.
Definition at line 163 of file StrMatcher.h.
|
inline |
Whether this has mode STRING.
Definition at line 166 of file StrMatcher.h.
|
inline |
Whether this has mode STRINGSTART.
Definition at line 169 of file StrMatcher.h.
|
inline |
Whether this has mode STRINGEND.
Definition at line 172 of file StrMatcher.h.
|
inline |
Whether this has mode SUBSTRING.
Definition at line 175 of file StrMatcher.h.
|
inline |
Whether this has mode GLOB.
Definition at line 178 of file StrMatcher.h.
|
inline |
Whether this has mode REGEX.
Definition at line 181 of file StrMatcher.h.
|
inline |
Set the mode part to rhs .
Definition at line 185 of file StrMatcher.h.
|
inline |
Set the mode STRING.
Definition at line 188 of file StrMatcher.h.
|
inline |
Set the mode STRINGSTART.
Definition at line 191 of file StrMatcher.h.
|
inline |
Set the mode STRINGEND.
Definition at line 194 of file StrMatcher.h.
|
inline |
Set the mode SUBSTRING.
Definition at line 197 of file StrMatcher.h.
|
inline |
Set the mode GLOB.
Definition at line 200 of file StrMatcher.h.
|
inline |
Set the mode REGEX.
Definition at line 203 of file StrMatcher.h.
std::string zypp::Match::asString | ( | ) | const |
String representation.
Definition at line 82 of file StrMatcher.cc.
|
private |
|
inlineprivate |
Definition at line 212 of file StrMatcher.h.
|
staticprivate |
Numeric value for enum (short for Match(m).get()
).
Definition at line 66 of file StrMatcher.cc.
Definition at line 222 of file StrMatcher.h.
Definition at line 225 of file StrMatcher.h.
Definition at line 229 of file StrMatcher.h.
|
related |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 232 of file StrMatcher.h.
Definition at line 236 of file StrMatcher.h.
|
related |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 239 of file StrMatcher.h.
|
related |
Stream output
Definition at line 103 of file StrMatcher.cc.
|
staticprivate |
Definition at line 36 of file StrMatcher.h.
|
staticprivate |
Definition at line 37 of file StrMatcher.h.
|
static |
If set, match case insensitive.
Definition at line 60 of file StrMatcher.h.
|
static |
LookupAttr: internal.
Definition at line 70 of file StrMatcher.h.
|
static |
LookupAttr: internal.
Definition at line 71 of file StrMatcher.h.
|
static |
LookupAttr: internal.
Definition at line 72 of file StrMatcher.h.
|
static |
LookupAttr: internal.
Definition at line 73 of file StrMatcher.h.
|
static |
LookupAttr: internal.
Definition at line 74 of file StrMatcher.h.
|
static |
LookupAttr: skip any kind:
prefix when looking at a Solvable name.
Definition at line 75 of file StrMatcher.h.
|
static |
LookupAttr: match full path when matching in filelists, otherwise just the basenames.
Definition at line 76 of file StrMatcher.h.
|
static |
LookupAttr: also look for matches in checksums.
Definition at line 77 of file StrMatcher.h.
|
private |
Definition at line 218 of file StrMatcher.h.