#include <IdString.h>
Public Types | |
typedef sat::detail::IdType | IdType |
Public Member Functions | |
IdString () | |
Default ctor, empty string. | |
IdString (IdType id_r) | |
Ctor from id. | |
IdString (const char *str_r) | |
Ctor from string. | |
IdString (const std::string &str_r) | |
Ctor from string. | |
bool | empty () const |
Whether the string is empty. | |
unsigned | size () const |
The strings size. | |
const char * | c_str () const |
Conversion to const char * . | |
std::string | asString () const |
Conversion to std::string . | |
bool | compareEQ (const IdString &rhs) const |
Fast compare equal. | |
int | compare (const IdString &rhs) const |
Compare IdString returning -1,0,1 . | |
int | compare (const char *rhs) const |
int | compare (const std::string &rhs) const |
IdType | id () const |
Expert backdoor. | |
Static Public Attributes | |
static const IdString | Null |
No or Null string ( Id 0 ). | |
static const IdString | Empty |
Empty string. | |
Private Member Functions | |
friend | base::SafeBool () const |
bool | boolTest () const |
Private Attributes | |
IdType | _id |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const IdString &obj) |
std::ostream & | dumpOn (std::ostream &str, const IdString &obj) |
bool | operator== (const IdString &lhs, const IdString &rhs) |
bool | operator!= (const IdString &lhs, const IdString &rhs) |
bool | operator< (const IdString &lhs, const IdString &rhs) |
bool | operator<= (const IdString &lhs, const IdString &rhs) |
bool | operator> (const IdString &lhs, const IdString &rhs) |
bool | operator>= (const IdString &lhs, const IdString &rhs) |
Construction from string will place a copy of the string in the string space, if it is not already present.
While comparison differs between IdString::Null and IdString::Empty ( NULL
and ""
), both are represented by an empty string ""
.
Definition at line 41 of file IdString.h.
Definition at line 45 of file IdString.h.
zypp::IdString::IdString | ( | ) | [inline] |
zypp::IdString::IdString | ( | IdType | id_r | ) | [inline, explicit] |
zypp::IdString::IdString | ( | const char * | str_r | ) | [explicit] |
zypp::IdString::IdString | ( | const std::string & | str_r | ) | [explicit] |
bool zypp::IdString::empty | ( | ) | const [inline] |
Whether the string is empty.
This is true for Null and Empty.
Definition at line 75 of file IdString.h.
References _id, zypp::sat::detail::emptyId(), and zypp::sat::detail::noId().
Referenced by zypp::Capability::_doMatch(), zypp::parser::ProductFileData::empty(), zypp::IdStringType< zypp::PoolQueryAttr >::empty(), and zypp::solver::detail::helixXML().
unsigned zypp::IdString::size | ( | ) | const |
The strings size.
Definition at line 39 of file IdString.cc.
References c_str().
Referenced by zypp::IdStringType< zypp::PoolQueryAttr >::size().
const char * zypp::IdString::c_str | ( | ) | const |
Conversion to const char *
.
Definition at line 42 of file IdString.cc.
References _id, and zypp::sat::detail::PoolMember::myPool().
Referenced by zypp::sat::_doSplit(), asString(), zypp::IdStringType< zypp::PoolQueryAttr >::c_str(), zypp::IdStringType< zypp::PoolQueryAttr >::compare(), compare(), zypp::packagedelta::DeltaRpm::DeltaRpm(), zypp::dumpOn(), zypp::sat::Solvable::SplitIdent::explicitKind(), zypp::InstanceId::getIdFor(), zypp::Capability::guessPackageSpec(), zypp::Capability::isInterestingFileSpec(), zypp::sat::Solvable::isKind(), zypp::sat::Solvable::kind(), zypp::pool::ByIdent::makeIdent(), zypp::Edition::match(), zypp::sat::Solvable::name(), zypp::parser::operator<<(), zypp::operator<<(), zypp::solver::detail::SATResolver::problems(), zypp::target::Modalias::query(), zypp::solver::detail::SATResolver::setSystemRequirements(), and size().
std::string zypp::IdString::asString | ( | ) | const [inline] |
Conversion to std::string
.
Definition at line 86 of file IdString.h.
References c_str().
Referenced by zypp::PoolQuery::addDependency(), zypp::Locks::addLock(), zypp::IdStringType< zypp::PoolQueryAttr >::asString(), zypp::packagedelta::DeltaRpm::DeltaRpm(), zypp::Capability::guessPackageSpec(), zypp::solver::detail::helixXML(), zypp::makeTrivialQuery(), zypp::solver::detail::SATResolver::problems(), zypp::Locks::removeLock(), and zypp::ResObject::vendor().
bool zypp::IdString::compareEQ | ( | const IdString & | rhs | ) | const [inline] |
Fast compare equal.
Definition at line 91 of file IdString.h.
Referenced by zypp::Edition::match(), operator!=(), and operator==().
int zypp::IdString::compare | ( | const IdString & | rhs | ) | const |
Compare IdString returning -1,0,1
.
Definition at line 45 of file IdString.cc.
Referenced by compare(), zypp::operator!=(), zypp::operator<(), operator<(), zypp::operator<=(), operator<=(), zypp::operator==(), zypp::operator>(), operator>(), zypp::operator>=(), and operator>=().
int zypp::IdString::compare | ( | const char * | rhs | ) | const |
int zypp::IdString::compare | ( | const std::string & | rhs | ) | const [inline] |
IdType zypp::IdString::id | ( | ) | const [inline] |
Expert backdoor.
Definition at line 106 of file IdString.h.
References _id.
Referenced by compareEQ(), zypp::dumpOn(), zypp::sat::LookupAttr::iterator::id(), zypp::IdStringType< zypp::PoolQueryAttr >::id(), zypp::Arch::id(), zypp::Arch::CompatEntry::id(), zypp::pool::PoolImpl::id2item(), zypp::pool::ByIdent::makeIdent(), zypp::Capability::matches(), zypp::pool::ByIdent::operator()(), and zypp::relFromStr().
zypp::IdString::base::SafeBool | ( | ) | const [private] |
bool zypp::IdString::boolTest | ( | ) | const [inline, private] |
std::ostream & operator<< | ( | std::ostream & | str, | |
const IdString & | obj | |||
) | [related] |
Stream output
Definition at line 72 of file IdString.cc.
std::ostream & dumpOn | ( | std::ostream & | str, | |
const IdString & | obj | |||
) | [related] |
Stream output
Definition at line 77 of file IdString.cc.
const IdString zypp::IdString::Null [static] |
const IdString zypp::IdString::Empty [static] |
IdType zypp::IdString::_id [private] |
Definition at line 114 of file IdString.h.
Referenced by boolTest(), c_str(), compare(), compareEQ(), empty(), and id().