openscenegraph
PluginQuery
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield
2 *
3 * This application is open source and may be redistributed and/or modified
4 * freely and without restriction, both in commercial and non commercial applications,
5 * as long as this copyright notice is maintained.
6 *
7 * This application is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10*/
11
12#ifndef PLUGINQUERY_H
13#define PLUGINQUERY_H
14
15#include <osgDB/Export>
16#include <osgDB/ReaderWriter>
17
18#include <osg/Referenced>
19#include <osg/ref_ptr>
20
21#include <list>
22#include <string>
23
24namespace osgDB
25{
26
27typedef std::list<std::string> FileNameList;
28
29FileNameList OSGDB_EXPORT listAllAvailablePlugins();
30
31class ReaderWriterInfo : public osg::Referenced
32{
33 public:
34
35 ReaderWriterInfo():
36 features(ReaderWriter::FEATURE_NONE) {}
37
38 std::string plugin;
39 std::string description;
40 ReaderWriter::FormatDescriptionMap protocols;
41 ReaderWriter::FormatDescriptionMap extensions;
42 ReaderWriter::FormatDescriptionMap options;
43 ReaderWriter::Features features;
44
45 protected:
46
47 virtual ~ReaderWriterInfo() {}
48};
49
50typedef std::list< osg::ref_ptr<ReaderWriterInfo> > ReaderWriterInfoList;
51
52bool OSGDB_EXPORT queryPlugin(const std::string& fileName, ReaderWriterInfoList& infoList);
53
54bool OSGDB_EXPORT outputPluginDetails(std::ostream& out, const std::string& fileName);
55
56}
57
58#endif