2008-07-14 16:48:49 +08:00
|
|
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
|
2008-07-25 18:18:36 +08:00
|
|
|
#include <osgDB/Export>
|
2008-07-26 03:53:18 +08:00
|
|
|
#include <osgDB/ReaderWriter>
|
|
|
|
|
|
|
|
#include <osg/Referenced>
|
|
|
|
#include <osg/ref_ptr>
|
2008-07-25 18:18:36 +08:00
|
|
|
|
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;
|
|
|
|
|
2008-07-25 18:18:36 +08:00
|
|
|
FileNameList OSGDB_EXPORT listAllAvailablePlugins();
|
2008-07-14 16:48:49 +08:00
|
|
|
|
2008-07-15 04:22:38 +08:00
|
|
|
class ReaderWriterInfo : public osg::Referenced
|
|
|
|
{
|
|
|
|
public:
|
2008-07-26 03:53:18 +08:00
|
|
|
|
|
|
|
ReaderWriterInfo() {}
|
2008-07-15 04:22:38 +08:00
|
|
|
|
|
|
|
std::string plugin;
|
|
|
|
std::string description;
|
|
|
|
ReaderWriter::FormatDescriptionMap protocols;
|
|
|
|
ReaderWriter::FormatDescriptionMap extensions;
|
|
|
|
ReaderWriter::FormatDescriptionMap options;
|
2009-03-10 23:00:39 +08:00
|
|
|
ReaderWriter::Features features;
|
2008-07-26 03:53:18 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual ~ReaderWriterInfo() {}
|
2008-07-15 04:22:38 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::list< osg::ref_ptr<ReaderWriterInfo> > ReaderWriterInfoList;
|
|
|
|
|
2008-07-25 18:18:36 +08:00
|
|
|
bool OSGDB_EXPORT queryPlugin(const std::string& fileName, ReaderWriterInfoList& infoList);
|
2008-07-14 16:48:49 +08:00
|
|
|
|
2008-07-25 18:18:36 +08:00
|
|
|
bool OSGDB_EXPORT outputPluginDetails(std::ostream& out, const std::string& fileName);
|
2008-07-24 20:01:23 +08:00
|
|
|
|
2008-07-14 16:48:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|