mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-31 18:24:25 +03:00
Implement wsrep:🆔:to_string()
This commit is contained in:
@ -93,6 +93,11 @@ namespace wsrep
|
|||||||
{
|
{
|
||||||
return undefined_;
|
return undefined_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return id in string representation.
|
||||||
|
*/
|
||||||
|
std::string to_string() const;
|
||||||
private:
|
private:
|
||||||
static const wsrep::id undefined_;
|
static const wsrep::id undefined_;
|
||||||
native_type data_;
|
native_type data_;
|
||||||
|
@ -50,6 +50,13 @@ wsrep::id::id(const std::string& str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string wsrep::id::to_string() const
|
||||||
|
{
|
||||||
|
std::ostringstream os;
|
||||||
|
os << *this;
|
||||||
|
return os.str();
|
||||||
|
}
|
||||||
|
|
||||||
std::ostream& wsrep::operator<<(std::ostream& os, const wsrep::id& id)
|
std::ostream& wsrep::operator<<(std::ostream& os, const wsrep::id& id)
|
||||||
{
|
{
|
||||||
const char* ptr(static_cast<const char*>(id.data()));
|
const char* ptr(static_cast<const char*>(id.data()));
|
||||||
|
Reference in New Issue
Block a user