Added check for :: in wrapper name when writing out to .osg, so that

if a namaspace:: exists in the wrapper name then one isn't created for
it by default.
This commit is contained in:
Robert Osfield 2003-08-25 22:50:01 +00:00
parent 5a0b499637
commit 229a0f2920

View File

@ -1002,7 +1002,16 @@ bool Registry::writeObject(const osg::Object& obj,Output& fw)
else
{
// member of the node kit so must use composite library::class name.
fw.indent() << obj.libraryName()<<"::"<< wrapper->getName() << " {"<< std::endl;
std::string::size_type posDoubleColon = wrapper->getName().find("::");
if (posDoubleColon != std::string::npos)
{
fw.indent() << wrapper->getName() << " {"<< std::endl;
}
else
{
fw.indent() << obj.libraryName()<<"::"<< wrapper->getName() << " {"<< std::endl;
}
fw.moveIn();
}