Hi John et. al,

On Wed, Dec 16, 2009 at 1:34 PM, Robert Osfield
<[email protected]> wrote:
> To be clear automatically setting ReaderWriter::_supportedExtensions
> from osgDB won't be generally be safe.   For specific plugins it might
> be possible to use it, and for these I would recommend you try loading
> the plugin and then adding the extra extension directly as I've
> suggested in my last two post.

I've just realized that since the ReaderWriter::supportsExtension()
method is protected it isn't possible inject additions extensions into
a plugin.  Changing this and associated methods to be be public would
open the door to it, although given it's not generally safe
documenting.  To this end I've just checked in the change of these
methods to public scope, and added docs explain their usual usage.

        /** Specify fmt string as a supported protocol.
          * Please note, this method should usually only be used
internally by subclasses of ReaderWriter, Only in special cases
          * will a ReaderWriter implementation be able to handle a
protocol format that is wasn't original designed for.
          * To know whether it's safe to inject a new protocol format
to an existing ReaderWriter you will need to review
          * the source code and dependencies of that ReaderWriter. */
        void supportsProtocol(const std::string& fmt, const
std::string& description);

        /** Specify ext string as a supported file extension.
          * Please note, this method should usually only be used
internally by subclasses of ReaderWriter. Only in special cases
          * will a ReaderWriter implementation be able to handle a
file extension that is wasn't original designed for.
          * To know whether it's safe to inject a new file extension
to an existing ReaderWriter you will need to review the
          * the source code and dependencies of that ReaderWriter. */
        void supportsExtension(const std::string& ext, const
std::string& description);

        /** Specify option string as a supported option string.
          * Please note, this should usually only be used internally
by subclasses of ReaderWriter. */
        void supportsOption(const std::string& opt, const std::string&
description);

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to