mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
Core: Value support for Xmlize, Jasonize
git-svn-id: svn://ultimatepp.org/upp/trunk@4651 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
4261c47291
commit
a0e6ae4a96
14 changed files with 293 additions and 60 deletions
|
|
@ -6,7 +6,7 @@ NAMESPACE_UPP
|
|||
|
||||
#ifdef SVO_VALUE
|
||||
INITBLOCK {
|
||||
Value::Register<Uuid>();
|
||||
Value::Register<Uuid>("Uuid");
|
||||
}
|
||||
#else
|
||||
INITBLOCK {
|
||||
|
|
@ -68,6 +68,16 @@ Uuid ScanUuid(const char *s)
|
|||
return id;
|
||||
}
|
||||
|
||||
void Uuid::Xmlize(XmlIO& xio)
|
||||
{
|
||||
String h;
|
||||
if(xio.IsStoring())
|
||||
h = Format(*this);
|
||||
xio.Attr("value", h);
|
||||
if(xio.IsLoading())
|
||||
*this = ScanUuid(h);
|
||||
}
|
||||
|
||||
String Uuid::ToString() const
|
||||
{
|
||||
return Format(*this);
|
||||
|
|
|
|||
Loading…
Reference in a new issue