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:
cxl 2012-03-03 15:49:28 +00:00
commit a0e6ae4a96
14 changed files with 293 additions and 60 deletions

View file

@ -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);