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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user