Added new ReaderWriter methods for recording what protocols, extensions and options are
support by ReaderWriters
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
#include <osgDB/ReaderWriter>
|
||||
#include <osgDB/FileNameUtils>
|
||||
#include <osgDB/Archive>
|
||||
|
||||
using namespace osgDB;
|
||||
@@ -33,3 +34,24 @@ osg::Shader* ReaderWriter::ReadResult::takeShader() { osg::Shader* shader=dynami
|
||||
ReaderWriter::~ReaderWriter()
|
||||
{
|
||||
}
|
||||
|
||||
bool ReaderWriter::acceptsExtension(const std::string& extension) const
|
||||
{
|
||||
std::string lowercase_ext = convertToLowerCase(extension);
|
||||
return (_supportedExtensions.count(lowercase_ext)!=0);
|
||||
}
|
||||
|
||||
void ReaderWriter::supportsProtocol(const std::string& fmt, const std::string& description)
|
||||
{
|
||||
_supportedProtocols[convertToLowerCase(fmt)] = description;
|
||||
}
|
||||
|
||||
void ReaderWriter::supportsExtension(const std::string& fmt, const std::string& description)
|
||||
{
|
||||
_supportedExtensions[convertToLowerCase(fmt)] = description;
|
||||
}
|
||||
|
||||
void ReaderWriter::supportsOption(const std::string& fmt, const std::string& description)
|
||||
{
|
||||
_supportedOptions[fmt] = description;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user