libzypp 17.37.17
|
Access to the sat-pools string space. More...
#include <zypp/IdString.h>
Public Types | |
using | IdType = sat::detail::IdType |
Public Member Functions | |
constexpr | IdString () |
Default ctor, empty string. | |
constexpr | IdString (IdType id_r) |
Ctor from id. | |
IdString (const char *str_r) | |
Ctor from string. | |
IdString (const char *str_r, unsigned len_r) | |
Ctor from string (pointer,length). | |
IdString (const std::string &str_r) | |
Ctor from string. | |
IdString (boost::string_ref str_r) | |
Ctor from boost::string_ref. | |
constexpr | operator bool () const |
Evaluate in a boolean context ( != Null ). | |
constexpr bool | empty () const |
Whether the string is empty. | |
unsigned | size () const |
The strings size. | |
const char * | c_str () const |
Conversion to const char * | |
std::string | asString () const |
Conversion to std::string | |
operator std::string () const | |
Explicit conversion to std::string. | |
bool | compareEQ (const IdString &rhs) const |
Fast compare equal. | |
int | compare (const IdString &rhs) const |
Compare IdString returning -1,0,1. | |
int | compare (const char *rhs) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
int | compare (const std::string &rhs) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
IdType | id () const |
Expert backdoor. |
Static Public Attributes | |
static const IdString | Null |
No or Null string ( Id 0 ). | |
static const IdString | Empty |
Empty string. |
Private Attributes | |
IdType | _id |
Related Symbols | |
(Note that these are not member symbols.) | |
std::ostream & | operator<< (std::ostream &str, const IdString &obj) ZYPP_API |
Stream output. | |
std::ostream & | dumpOn (std::ostream &str, const IdString &obj) ZYPP_API |
Stream output. | |
bool | operator== (const IdString &lhs, const IdString &rhs) |
Equal. | |
bool | operator!= (const IdString &lhs, const IdString &rhs) |
NotEqual. | |
bool | operator< (const IdString &lhs, const IdString &rhs) |
Less. | |
bool | operator<= (const IdString &lhs, const IdString &rhs) |
LessEqual. | |
bool | operator> (const IdString &lhs, const IdString &rhs) |
Greater. | |
bool | operator>= (const IdString &lhs, const IdString &rhs) |
GreaterEqual. |
Additional Inherited Members | |
Static Protected Member Functions inherited from zypp::sat::detail::PoolMember | |
static PoolImpl & | myPool () |
Access to the sat-pools string space.
Construction from string will place a copy of the string in the string space, if it is not already present.
While comparison differs between IdString::Null and IdString::Empty ( NULL
and ""
), both are represented by an empty string ""
.
Definition at line 43 of file IdString.h.
Definition at line 46 of file IdString.h.
|
inlineconstexpr |
Default ctor, empty string.
Definition at line 50 of file IdString.h.
|
inlineexplicitconstexpr |
Ctor from id.
Definition at line 53 of file IdString.h.
|
explicit |
Ctor from string.
Definition at line 31 of file IdString.cc.
zypp::IdString::IdString | ( | const char * | str_r, |
unsigned | len_r ) |
Ctor from string (pointer,length).
Definition at line 35 of file IdString.cc.
|
explicit |
Ctor from string.
Definition at line 39 of file IdString.cc.
|
explicit |
Ctor from boost::string_ref.
Definition at line 43 of file IdString.cc.
|
inlineexplicitconstexpr |
Evaluate in a boolean context ( != Null
).
Definition at line 82 of file IdString.h.
|
inlineconstexpr |
Whether the string is empty.
This is true for Null and Empty.
Definition at line 88 of file IdString.h.
unsigned zypp::IdString::size | ( | ) | const |
The strings size.
Definition at line 47 of file IdString.cc.
const char * zypp::IdString::c_str | ( | ) | const |
Conversion to const char *
Definition at line 50 of file IdString.cc.
|
inline |
Conversion to std::string
Definition at line 99 of file IdString.h.
|
inlineexplicit |
Explicit conversion to std::string.
Definition at line 103 of file IdString.h.
Fast compare equal.
Definition at line 118 of file IdString.h.
int zypp::IdString::compare | ( | const IdString & | rhs | ) | const |
Compare IdString returning -1,0,1.
Definition at line 53 of file IdString.cc.
int zypp::IdString::compare | ( | const char * | rhs | ) | const |
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 65 of file IdString.cc.
|
inline |
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 128 of file IdString.h.
|
inline |
Expert backdoor.
Definition at line 133 of file IdString.h.
|
Stream output.
Definition at line 80 of file IdString.cc.
|
Stream output.
Definition at line 85 of file IdString.cc.
Equal.
Definition at line 148 of file IdString.h.
NotEqual.
Definition at line 164 of file IdString.h.
Less.
Definition at line 180 of file IdString.h.
LessEqual.
Definition at line 196 of file IdString.h.
Greater.
Definition at line 212 of file IdString.h.
GreaterEqual.
Definition at line 228 of file IdString.h.
|
static |
No or Null string ( Id 0
).
Definition at line 75 of file IdString.h.
|
static |
Empty string.
Definition at line 78 of file IdString.h.
|
private |
Definition at line 137 of file IdString.h.