12#ifndef ZYPP_SAT_IDSTR_H
13#define ZYPP_SAT_IDSTR_H
19#include <boost/utility/string_ref_fwd.hpp>
66#ifdef __cpp_lib_string_view
81 constexpr explicit operator bool()
const
91 unsigned size()
const;
95 const char *
c_str()
const;
102 explicit operator std::string()
const
105#ifdef __cpp_lib_string_view
111 explicit operator std::string_view()
const
112 {
return asStringView(); }
118 {
return(
_id == rhs.
id() ); }
124 int compare(
const char * rhs )
const;
128 {
return compare( rhs.c_str() ); }
151 {
return lhs.
compare( rhs ) == 0; }
154 {
return lhs.
compare( rhs ) == 0; }
157 {
return rhs.
compare( lhs ) == 0; }
160 {
return rhs.
compare( lhs ) == 0; }
167 {
return lhs.
compare( rhs ) != 0; }
170 {
return lhs.
compare( rhs ) != 0; }
173 {
return rhs.
compare( lhs ) != 0; }
176 {
return rhs.
compare( lhs ) != 0; }
180 {
return lhs.
compare( rhs ) < 0; }
183 {
return lhs.
compare( rhs ) < 0; }
186 {
return lhs.
compare( rhs ) < 0; }
189 {
return rhs.
compare( lhs ) >= 0; }
192 {
return rhs.
compare( lhs ) >= 0; }
196 {
return lhs.
compare( rhs ) <= 0; }
199 {
return lhs.
compare( rhs ) <= 0; }
202 {
return lhs.
compare( rhs ) <= 0; }
205 {
return rhs.
compare( lhs ) > 0; }
208 {
return rhs.
compare( lhs ) > 0; }
212 {
return lhs.
compare( rhs ) > 0; }
215 {
return lhs.
compare( rhs ) > 0; }
218 {
return lhs.
compare( rhs ) > 0; }
221 {
return rhs.
compare( lhs ) <= 0; }
224 {
return rhs.
compare( lhs ) <= 0; }
228 {
return lhs.
compare( rhs ) >= 0; }
231 {
return lhs.
compare( rhs ) >= 0; }
234 {
return lhs.
compare( rhs ) >= 0; }
237 {
return rhs.
compare( lhs ) < 0; }
240 {
return rhs.
compare( lhs ) < 0; }
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Access to the sat-pools string space.
unsigned size() const
The strings size.
constexpr IdString(IdType id_r)
Ctor from id.
bool operator>=(const IdString &lhs, const IdString &rhs)
GreaterEqual.
const char * c_str() const
Conversion to const char *
int compare(const IdString &rhs) const
Compare IdString returning -1,0,1.
bool operator!=(const IdString &lhs, const IdString &rhs)
NotEqual.
int compare(const std::string &rhs) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
sat::detail::IdType IdType
constexpr bool empty() const
Whether the string is empty.
bool operator>(const IdString &lhs, const IdString &rhs)
Greater.
bool operator==(const IdString &lhs, const IdString &rhs)
Equal.
IdType id() const
Expert backdoor.
static const IdString Null
No or Null string ( Id 0 ).
static const IdString Empty
Empty string.
std::string asString() const
Conversion to std::string
bool operator<=(const IdString &lhs, const IdString &rhs)
LessEqual.
bool compareEQ(const IdString &rhs) const
Fast compare equal.
bool operator<(const IdString &lhs, const IdString &rhs)
Less.
constexpr IdString()
Default ctor, empty string.
String related utilities and Regular expression matching.
static const IdType emptyId(1)
static const IdType noId(0)
int IdType
Generic Id type.
Easy-to use interface to the ZYPP dependency resolver.
bool operator<(const StrMatcher &lhs, const StrMatcher &rhs)
bool operator==(const SetRelation::Enum &lhs, const SetCompare &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool operator>(const IdString &lhs, const char *rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
std::unordered_set< IdString > IdStringSet
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
bool operator>=(const IdString &lhs, const char *rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool operator!=(const SetRelation::Enum &lhs, const SetCompare &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool operator<=(const IdString &lhs, const char *rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Backlink to the associated PoolImpl.
#define ZYPP_DEFINE_ID_HASHABLE(C)
Define hash function for id based classes.