| Home | Download | Screen shots | Discussion | Documentation |
|---|
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. | |
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.
| 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.
| [in] | media_types | the set of MIME media types that identify scripts supported by the module. |
| [in] | uri_schemes | the set of URI schemes that identify scripts supported by the module. |
| [in] | factory | the factory. |
true if the factory was registered successfully; false otherwise