OpenSceneGraph/include/osgDB/PluginQuery

60 lines
1.6 KiB
Plaintext
Raw Normal View History

/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield
2008-07-14 16:48:49 +08:00
*
* This application is open source and may be redistributed and/or modified
2010-11-22 19:22:03 +08:00
* freely and without restriction, both in commercial and non commercial applications,
2008-07-14 16:48:49 +08:00
* as long as this copyright notice is maintained.
*
2008-07-14 16:48:49 +08:00
* This application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef PLUGINQUERY_H
#define PLUGINQUERY_H
#include <osgDB/Export>
2008-07-26 03:53:18 +08:00
#include <osgDB/ReaderWriter>
#include <osg/Referenced>
#include <osg/ref_ptr>
2008-07-14 16:48:49 +08:00
#include <list>
2008-07-26 03:53:18 +08:00
#include <string>
2008-07-14 16:48:49 +08:00
namespace osgDB
{
typedef std::list<std::string> FileNameList;
FileNameList OSGDB_EXPORT listAllAvailablePlugins();
2008-07-14 16:48:49 +08:00
class ReaderWriterInfo : public osg::Referenced
{
public:
2016-06-22 18:51:04 +08:00
ReaderWriterInfo():
features(ReaderWriter::FEATURE_NONE) {}
std::string plugin;
std::string description;
ReaderWriter::FormatDescriptionMap protocols;
ReaderWriter::FormatDescriptionMap extensions;
ReaderWriter::FormatDescriptionMap options;
ReaderWriter::FormatDescriptionMap environment;
ReaderWriter::Features features;
2008-07-26 03:53:18 +08:00
protected:
2008-07-26 03:53:18 +08:00
virtual ~ReaderWriterInfo() {}
};
typedef std::list< osg::ref_ptr<ReaderWriterInfo> > ReaderWriterInfoList;
bool OSGDB_EXPORT queryPlugin(const std::string& fileName, ReaderWriterInfoList& infoList);
2008-07-14 16:48:49 +08:00
bool OSGDB_EXPORT outputPluginDetails(std::ostream& out, const std::string& fileName);
2008-07-14 16:48:49 +08:00
}
#endif