LibreOffice LibreOffice 25.2 SDK API Reference

Public Member Functions | List of all members
XMultiServiceFactory Interface Referencepublished

Allows creating instances specified by a string name. More...

`import"XMultiServiceFactory.idl";`

Inheritance diagram for XMultiServiceFactory:

## Public Member Functions
com::sun::star::uno::XInterface | createInstance ([in] string aServiceSpecifier) raises ( com::sun::star::uno::Exception )
| Creates an instance classified by the specified name. More...
com::sun::star::uno::XInterface | createInstanceWithArguments ([in] string ServiceSpecifier, [in] sequence< any > Arguments) raises ( com::sun::star::uno::Exception )
| Creates an instance classified by the specified name and passes the arguments to that instance. More...
sequence< string > | getAvailableServiceNames ()
| Provides the available names of the factory to be used to create instances. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

Allows creating instances specified by a string name.

Note
  Although this interface deals with the notion of "services", it is not restricted to services but is more general. This interface can be used for all kinds of factories for all kinds of instances, not only UNO services.

Developers Guide
  Professional UNO - Service Manager and Component Context

## Member Function Documentation

## ◆ createInstance()

com::sun::star::uno::XInterface createInstance | ( | [in] string | aServiceSpecifier | ) |
raises | ( | com::sun::star::uno::Exception
| ) |  |

Creates an instance classified by the specified name.

Parameters

  aServiceSpecifier | classified name of instance

Returns
  instance

## ◆ createInstanceWithArguments()

com::sun::star::uno::XInterface createInstanceWithArguments | ( | [in] string | ServiceSpecifier,
|  | [in] sequence< any > | Arguments
| ) |  |
raises | ( | com::sun::star::uno::Exception
| ) |  |

Creates an instance classified by the specified name and passes the arguments to that instance.

Parameters

  ServiceSpecifier | classified name of instance
  Arguments | arguments passed to the instance

Returns
  instance

## ◆ getAvailableServiceNames()

sequence< string > getAvailableServiceNames | ( |  | ) |

Provides the available names of the factory to be used to create instances.

Returns
  sequence of all names

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

- com/sun/star/lang/XMultiServiceFactory.idl