12 #ifndef ZYPP_SAT_IDSTR_H 13 #define ZYPP_SAT_IDSTR_H 17 #include <string_view> 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() ); }
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; }
260 #endif // ZYPP_SAT_IDSTR_H #define LEGACY(CL)
Legacy code we still support.
bool operator==(const Capability &lhs, const Capability &rhs)
relates: Capability
int compare(const IdString &rhs) const
Compare IdString returning -1,0,1.
int compare(const std::string &rhs) const
std::string asString(const Patch::Category &obj)
relates: Patch::Category string representation.
bool operator>(const IdString &lhs, const IdString &rhs)
relates: IdString Greater
bool compareEQ(const IdString &rhs) const
Fast compare equal.
IdType id() const
Expert backdoor.
String related utilities and Regular expression matching.
int IdType
Generic Id type.
Access to the sat-pools string space.
sat::detail::IdType IdType
constexpr IdString()
Default ctor, empty string.
constexpr bool empty() const
Whether the string is empty.
std::unordered_set< IdString > IdStringSet
static const IdString Empty
Empty string.
Backlink to the associated PoolImpl.
static const IdType emptyId(1)
SetCompare compare(const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg)
relates: SetRelationMixin Compare sets
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
Provides API related macros.
ZYPP_DEFINE_ID_HASHABLE(::zypp::IdString)
bool operator!=(const Capability &lhs, const Capability &rhs)
relates: Capability
bool operator>=(const IdString &lhs, const IdString &rhs)
relates: IdString GreaterEqual
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
relates: Capability Detailed stream output
bool operator<=(const IdString &lhs, const IdString &rhs)
relates: IdString LessEqual
static const IdString Null
No or Null string ( Id 0 ).
static const IdType noId(0)
bool operator<(const Capability &lhs, const Capability &rhs)
relates: Capability Arbitrary order.
std::string asString() const
Conversion to std::string
constexpr IdString(IdType id_r)
Ctor from id.
std::ostream & operator<<(std::ostream &str, const Capabilities &obj)
relates: Capabilities Stream output
Easy-to use interface to the ZYPP dependency resolver.