Added support for ReadResult and WriteResult to the osgDB::ReaderWriter

to allo plugins to pass back more information about the success or failure
of a file load.  All plugins have been updated to the new convention.
This commit is contained in:
Robert Osfield
2001-10-30 14:20:37 +00:00
parent 97e4488d80
commit f0372817b5
23 changed files with 321 additions and 122 deletions

View File

@@ -31,10 +31,10 @@ class ReaderWriterTGZ : public osgDB::ReaderWriter
return osgDB::equalCaseInsensitive(extension,"tgz");
}
virtual Node* readNode(const std::string& fileName, const osgDB::ReaderWriter::Options*)
virtual ReadResult readNode(const std::string& fileName, const osgDB::ReaderWriter::Options*)
{
std::string ext = osgDB::getLowerCaseFileExtension(fileName);
if (!acceptsExtension(ext)) return NULL;
if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED;
osg::notify(osg::INFO)<< "ReaderWriterTGZ::readNode( "<<fileName.c_str()<<" )\n";
@@ -107,7 +107,7 @@ class ReaderWriterTGZ : public osgDB::ReaderWriter
if( grp->getNumChildren() == 0 )
{
grp->unref();
return NULL;
return ReadResult::FILE_NOT_HANDLED;
}
return grp;