Home | Download | Screen shots | Discussion | Documentation
--- | --- | --- | --- | ---

# openvrml::script_factory_registry Class Reference

Registry of `script_factories`. More...

List of all members.

## 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`.

## Private Member Functions

| script_factory_registry ()
| Construct.
| ~script_factory_registry ()
| Destroy.

## Private Attributes

boost::scoped_ptr< impl > | impl_
| A pointer to the implementation instance.

## Friends

class | script_node
| `script_node` is the only class that should ever need to instantiate `script_factory_registry`.

## 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.

## Constructor & Destructor Documentation

openvrml::script_factory_registry::script_factory_registry | ( |  | ) | `[private]`

Construct.

For internal use only.

openvrml::script_factory_registry::~script_factory_registry | ( |  | ) | `[private]`

Destroy.

For internal use only.

## 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_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.

Returns:
  `true` if the factory was registered successfully; `false` otherwise

## Friends And Related Function Documentation

class openvrml::script_factory_registry::script_node`[friend]`

`script_node` is the only class that should ever need to instantiate `script_factory_registry`.

For internal use only.

## Member Data Documentation

boost::scoped_ptr< openvrml::script_factory_registry::impl > openvrml::script_factory_registry::impl_`[private]`

A pointer to the implementation instance.