12#ifndef ZYPP_SAT_IDSTR_H
13#define ZYPP_SAT_IDSTR_H
18#include <unordered_set>
20#include <boost/utility/string_ref_fwd.hpp>
28#if ( LEGACY(1735) ) && !ZYPPNG
52#if (
LEGACY(1735) ) && !ZYPPNG
67 explicit IdString(
const char * str_r );
70 IdString(
const char * str_r,
unsigned len_r );
73 explicit IdString(
const std::string & str_r );
76 explicit IdString( boost::string_ref str_r );
78#ifdef __cpp_lib_string_view
79 explicit IdString( std::string_view str_r )
80 :
IdString( str_r.data(), str_r.size() )
93 constexpr explicit operator bool()
const
103 unsigned size()
const;
107 const char * c_str()
const;
114 explicit operator std::string()
const
117#ifdef __cpp_lib_string_view
119 std::string_view asStringView()
const
120 {
return { c_str(), size() }; }
123 explicit operator std::string_view()
const
124 {
return asStringView(); }
130 {
return(
_id == rhs.
id() ); }
133 int compare(
const IdString & rhs )
const;
136 int compare(
const char * rhs )
const;
140 {
return compare( rhs.c_str() ); }
163 {
return lhs.
compare( rhs ) == 0; }
166 {
return lhs.
compare( rhs ) == 0; }
169 {
return rhs.
compare( lhs ) == 0; }
172 {
return rhs.
compare( lhs ) == 0; }
179 {
return lhs.
compare( rhs ) != 0; }
182 {
return lhs.
compare( rhs ) != 0; }
185 {
return rhs.
compare( lhs ) != 0; }
188 {
return rhs.
compare( lhs ) != 0; }
192 {
return lhs.
compare( rhs ) < 0; }
195 {
return lhs.
compare( rhs ) < 0; }
198 {
return lhs.
compare( rhs ) < 0; }
201 {
return rhs.
compare( lhs ) >= 0; }
204 {
return rhs.
compare( lhs ) >= 0; }
208 {
return lhs.
compare( rhs ) <= 0; }
211 {
return lhs.
compare( rhs ) <= 0; }
214 {
return lhs.
compare( rhs ) <= 0; }
217 {
return rhs.
compare( lhs ) > 0; }
220 {
return rhs.
compare( lhs ) > 0; }
224 {
return lhs.
compare( rhs ) > 0; }
227 {
return lhs.
compare( rhs ) > 0; }
230 {
return lhs.
compare( rhs ) > 0; }
233 {
return rhs.
compare( lhs ) <= 0; }
236 {
return rhs.
compare( lhs ) <= 0; }
240 {
return lhs.
compare( rhs ) >= 0; }
243 {
return lhs.
compare( rhs ) >= 0; }
246 {
return lhs.
compare( rhs ) >= 0; }
249 {
return rhs.
compare( lhs ) < 0; }
252 {
return rhs.
compare( lhs ) < 0; }
Provides API related macros.
#define LEGACY(CL)
Legacy code we still support.
#define ZYPP_DEFINE_ID_HASHABLE(C)
Define hash function for id based classes.
Access to the sat-pools string space.
constexpr IdString(IdType id_r)
Ctor from id.
const char * c_str() const
Conversion to const char *.
int compare(const IdString &rhs) const
Compare IdString returning -1,0,1.
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.
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 compareEQ(const IdString &rhs) const
Fast compare equal.
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 IdString &lhs, const IdString &rhs)
relates: IdString Greater
bool operator>=(const IdString &lhs, const IdString &rhs)
relates: IdString GreaterEqual
bool operator<(const Capability &lhs, const Capability &rhs)
relates: Capability Arbitrary order.
bool operator!=(const Capability &lhs, const Capability &rhs)
relates: Capability
bool operator<=(const IdString &lhs, const IdString &rhs)
relates: IdString LessEqual
std::unordered_set< IdString > IdStringSet
bool operator==(const Capability &lhs, const Capability &rhs)
relates: Capability
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
relates: Capability Detailed stream output
std::string asString(const Patch::Category &obj)
relates: Patch::Category string representation.
std::ostream & operator<<(std::ostream &str, const Capabilities &obj)
relates: Capabilities Stream output
Backlink to the associated PoolImpl.