openvrml::script_factory_registry Class Reference

Registry of script_factories. More...

Public Member Functions

bool register_factory (const std::set< std::string > &media_types, const std::set< std::string > &uri_schemes, const boost::shared_ptr< script_factory > &factory) throw ( std::bad_alloc , std::invalid_argument )
 Register a factory for creating concrete scripts.

Detailed Description

Registry of script_factories.

In general there should be one script_factory registered per “scripting engine”; i.e., supported language in the Script node. An instance of the script_factory_registry is passed to openvrml_register_script_factory, which should be implemented by modules that add support for a scripting language.

Member Function Documentation

bool openvrml::script_factory_registry::register_factory ( const std::set< std::string > &  media_types,
const std::set< std::string > &  uri_schemes,
const boost::shared_ptr< script_factory > &  factory 
) throw ( std::bad_alloc , std::invalid_argument )

Register a factory for creating concrete scripts.

This function should be called in a script engine module's implementation of openvrml_script_LTX_register_factory.

Parameters
[in]media_typesthe set of MIME media types that identify scripts supported by the module.
[in]uri_schemesthe set of URI schemes that identify scripts supported by the module.
[in]factorythe factory.
Returns
true if the factory was registered successfully; false otherwise