From David Callu,

"bug fix to reflect the wchar_t in Value and Value.cpp I add the toWString() function.
in Type and Type.cpp I just add two function to get a map of propertyList and a map of methodList
i need this map in my editor a i think it's could be util to put this functionnality in osgIntrospection,
This commit is contained in:
Robert Osfield
2006-09-01 12:52:15 +00:00
parent 96e1630cc7
commit 616097e465
10 changed files with 211 additions and 14 deletions

View File

@@ -82,7 +82,7 @@ Value Value::tryConvertTo(const Type& outtype) const
std::string Value::toString() const
{
check_empty();
check_empty();
const ReaderWriter* rw = _type->getReaderWriter();
if (rw)
@@ -90,7 +90,22 @@ std::string Value::toString() const
std::ostringstream oss;
if (!rw->writeTextValue(oss, *this))
throw StreamWriteErrorException();
return oss.str();
return oss.str();
}
throw StreamingNotSupportedException(StreamingNotSupportedException::ANY, _type->getStdTypeInfo());
}
std::wstring Value::toWString() const
{
check_empty();
const ReaderWriter* rw = _type->getReaderWriter();
if (rw)
{
std::wostringstream woss;
if (!rw->writeTextValue(woss, *this))
throw StreamWriteErrorException();
return woss.str();
}
throw StreamingNotSupportedException(StreamingNotSupportedException::ANY, _type->getStdTypeInfo());
}