Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# PortableGroup::FactoryRegistry Interface Reference

`import "PortableGroup.idl";`

List of all members.

## Public Member Functions
void | register_factory (in RoleName role, in _TypeId type_id, in FactoryInfo factory_info) raises (MemberAlreadyPresent, TypeConflict)
void | unregister_factory (in RoleName role, in Location the_location) raises (MemberNotFound)
void | unregister_factory_by_role (in RoleName role)
void | unregister_factory_by_location (in Location the_location)
FactoryInfos | list_factories_by_role (in RoleName role, out _TypeId type_id)
FactoryInfos | list_factories_by_location (in Location the_location)

## Detailed Description

Interface to allow generic factories for replicas to register themselves. Factories are distinguished by the role to be played by the created-object (role) and the location at which they create the object (FactoryInfo.the_location)

Because this is an extension to the FT CORBA specification applications that wish to adhere to the specification as written should use the type id as the role name when interacting with the FactoryRegistry.

## Member Function Documentation

FactoryInfos PortableGroup::FactoryRegistry::list_factories_by_location | ( | in Location | the_location | ) |

  | List all the factories that create a objects at a given location. If no factories are registered for this location, an empty list is returned. This is not an error. Parameters:
  | location | where the factories create objects.

FactoryInfos PortableGroup::FactoryRegistry::list_factories_by_role | ( | in RoleName | role,
|  | out _TypeId | type_id
| ) |

  | List all the factories that create objects that fill a given role If the role is unknown, an empty list is returned. This is not an error. Parameters:
  | role | the type of object the factories create.
  | type_id | what type of object is created to fill this role.

void PortableGroup::FactoryRegistry::register_factory | ( | in RoleName | role,
|  | in _TypeId | type_id,
|  | in FactoryInfo | factory_info
| ) | raises (MemberAlreadyPresent, TypeConflict)

  | register a factory to create objects of the given type at the location given in the FactoryInfo. Parameters:
  | role | the role the object-to-be-created plays.
  | type_id | type id of the object-to-be-created.
  | factory_info | information about the factory including its location.
  Exceptions:
  | MemberAlreadyPresent | if there is already a factory for this type of object at this location.
  | TypeConflict | if the specified type_id is different from the type_id previously registered for this role.

void PortableGroup::FactoryRegistry::unregister_factory | ( | in RoleName | role,
|  | in Location | the_location
| ) | raises (MemberNotFound)

  | Remove the registration of a factory. Parameters:
  | role | the role played by the object formerly created by this factory.
  | location | where the factory formerly created objects.
  Exceptions:
  | MemberNotPresent | if no factory is available for the given role at this location.

void PortableGroup::FactoryRegistry::unregister_factory_by_location | ( | in Location | the_location | ) |

  | Remove the registration of all factories that create objects at a particular location. If the location is unknown the registry is unchanged. This is not an error. Parameters:
  | location | where the factories formerly created objects.

void PortableGroup::FactoryRegistry::unregister_factory_by_role | ( | in RoleName | role | ) |

  | Remove the registration of all factories that create a particular type of object. If no factories exist for the given type, the registry is unchanged. This is not an error. Parameters:
  | type_id | the type of object formerly created by the factories to be unregistered.

The documentation for this interface was generated from the following file:

- PortableGroup.idl