12 #ifndef ZYPP_SAT_IDSTR_H
13 #define ZYPP_SAT_IDSTR_H
25 typedef std::tr1::unordered_set<IdString>
IdStringSet;
52 explicit IdString(
const char * str_r );
55 explicit IdString(
const std::string & str_r );
66 explicit operator bool()
const
76 unsigned size()
const;
80 const char *
c_str()
const;
89 {
return(
_id == rhs.
id() ); }
95 int compare(
const char * rhs )
const;
98 int compare(
const std::string & rhs )
const
99 {
return compare( rhs.c_str() ); }
115 std::ostream &
dumpOn( std::ostream & str,
const IdString & obj );
122 {
return lhs.
compare( rhs ) == 0; }
125 {
return lhs.
compare( rhs ) == 0; }
128 {
return rhs.
compare( lhs ) == 0; }
131 {
return rhs.
compare( lhs ) == 0; }
138 {
return lhs.
compare( rhs ) != 0; }
141 {
return lhs.
compare( rhs ) != 0; }
144 {
return rhs.
compare( lhs ) != 0; }
147 {
return rhs.
compare( lhs ) != 0; }
151 {
return lhs.
compare( rhs ) < 0; }
154 {
return lhs.
compare( rhs ) < 0; }
157 {
return lhs.
compare( rhs ) < 0; }
160 {
return rhs.
compare( lhs ) >= 0; }
163 {
return rhs.
compare( lhs ) >= 0; }
167 {
return lhs.
compare( rhs ) <= 0; }
170 {
return lhs.
compare( rhs ) <= 0; }
173 {
return lhs.
compare( rhs ) <= 0; }
176 {
return rhs.
compare( lhs ) > 0; }
179 {
return rhs.
compare( lhs ) > 0; }
183 {
return lhs.
compare( rhs ) > 0; }
186 {
return lhs.
compare( rhs ) > 0; }
189 {
return lhs.
compare( rhs ) > 0; }
192 {
return rhs.
compare( lhs ) <= 0; }
195 {
return rhs.
compare( lhs ) <= 0; }
199 {
return lhs.
compare( rhs ) >= 0; }
202 {
return lhs.
compare( rhs ) >= 0; }
205 {
return lhs.
compare( rhs ) >= 0; }
208 {
return rhs.
compare( lhs ) < 0; }
211 {
return rhs.
compare( lhs ) < 0; }
219 #endif // ZYPP_SAT_IDSTR_H
int IdType
Generic Id type.
bool operator!=(const CountryCode &lhs, const CountryCode &rhs)
IdType id() const
Expert backdoor.
Access to the sat-pools string space.
std::string asString() const
Conversion to std::string
static const IdString Empty
Empty string.
Backlink to the associated PoolImpl.
static const IdType emptyId(1)
std::ostream & operator<<(std::ostream &str, const Exception &obj)
sat::detail::IdType IdType
bool operator==(const IdString &lhs, const IdString &rhs)
int compare(const std::string &rhs) const
bool operator>=(const IdString &lhs, const IdString &rhs)
#define ZYPP_DEFINE_ID_HASHABLE(C)
Define hash function for id based classes.
bool compareEQ(const IdString &rhs) const
Fast compare equal.
bool operator>(const IdString &lhs, const IdString &rhs)
bool operator<(const IdString &lhs, const IdString &rhs)
bool operator>=(const IdString &lhs, const char *rhs)
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
const char * c_str() const
Conversion to const char *
bool operator>(const IdString &lhs, const char *rhs)
bool operator!=(const IdString &lhs, const IdString &rhs)
bool operator==(const StrMatcher &lhs, const StrMatcher &rhs)
IdString(IdType id_r)
Ctor from id.
int compare(const IdString &rhs) const
Compare IdString returning -1,0,1.
IdString()
Default ctor, empty string.
static const IdString Null
No or Null string ( Id 0 ).
static const IdType noId(0)
bool empty() const
Whether the string is empty.
unsigned size() const
The strings size.
bool operator<(const StrMatcher &lhs, const StrMatcher &rhs)
bool operator<=(const IdString &lhs, const IdString &rhs)
std::tr1::unordered_set< IdString > IdStringSet
bool operator<=(const IdString &lhs, const char *rhs)