12#ifndef ZYPP_SAT_IDSTR_H
13#define ZYPP_SAT_IDSTR_H
19#include <boost/utility/string_ref_fwd.hpp>
55 explicit IdString(
const char * str_r );
58 IdString(
const char * str_r,
unsigned len_r );
61 explicit IdString(
const std::string & str_r );
64 explicit IdString( boost::string_ref str_r );
66#ifdef __cpp_lib_string_view
67 explicit IdString( std::string_view str_r )
81 constexpr explicit operator bool()
const
91 unsigned size()
const;
95 const char *
c_str()
const;
102 explicit operator std::string()
const
108 {
return(
_id == rhs.
id() ); }
114 int compare(
const char * rhs )
const;
118 {
return compare( rhs.c_str() ); }
141 {
return lhs.
compare( rhs ) == 0; }
144 {
return lhs.
compare( rhs ) == 0; }
147 {
return rhs.
compare( lhs ) == 0; }
150 {
return rhs.
compare( lhs ) == 0; }
157 {
return lhs.
compare( rhs ) != 0; }
160 {
return lhs.
compare( rhs ) != 0; }
163 {
return rhs.
compare( lhs ) != 0; }
166 {
return rhs.
compare( lhs ) != 0; }
170 {
return lhs.
compare( rhs ) < 0; }
173 {
return lhs.
compare( rhs ) < 0; }
176 {
return lhs.
compare( rhs ) < 0; }
179 {
return rhs.
compare( lhs ) >= 0; }
182 {
return rhs.
compare( lhs ) >= 0; }
186 {
return lhs.
compare( rhs ) <= 0; }
189 {
return lhs.
compare( rhs ) <= 0; }
192 {
return lhs.
compare( rhs ) <= 0; }
195 {
return rhs.
compare( lhs ) > 0; }
198 {
return rhs.
compare( lhs ) > 0; }
202 {
return lhs.
compare( rhs ) > 0; }
205 {
return lhs.
compare( rhs ) > 0; }
208 {
return lhs.
compare( rhs ) > 0; }
211 {
return rhs.
compare( lhs ) <= 0; }
214 {
return rhs.
compare( lhs ) <= 0; }
218 {
return lhs.
compare( rhs ) >= 0; }
221 {
return lhs.
compare( rhs ) >= 0; }
224 {
return lhs.
compare( rhs ) >= 0; }
227 {
return rhs.
compare( lhs ) < 0; }
230 {
return rhs.
compare( lhs ) < 0; }
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.
sat::detail::IdType IdType
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...
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.