UDK 3.2.7 C/C++ API Reference
Namespaces | Defines | Typedefs | Functions
cppuhelper/factory.hxx File Reference
#include <rtl/ustring.hxx>
#include <uno/dispatcher.h>
#include <rtl/unload.h>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include "cppuhelperdllapi.h"

Go to the source code of this file.

Namespaces

namespace  cppu

Defines

#define COMPONENT_GETENV   "component_getImplementationEnvironment"
#define COMPONENT_GETENVEXT   "component_getImplementationEnvironmentExt"
#define COMPONENT_GETDESCRIPTION   "component_getDescription"
#define COMPONENT_WRITEINFO   "component_writeInfo"
#define COMPONENT_GETFACTORY   "component_getFactory"

Typedefs

typedef struct _uno_Environment uno_Environment
typedef void(* component_getImplementationEnvironmentFunc )(const sal_Char **ppEnvTypeName, uno_Environment **ppEnv)
 Function pointer declaration.
typedef void(* component_getImplementationEnvironmentExtFunc )(sal_Char const **ppEnvTypeName, uno_Environment **ppEnv, sal_Char const *pImplName, uno_Environment *pTargetEnv)
 Function pointer declaration.
typedef const sal_Char *(* component_getDescriptionFunc )(void)
 Function pointer declaration.
typedef sal_Bool(* component_writeInfoFunc )(void *pServiceManager, void *pRegistryKey)
 Function pointer declaration.
typedef void *(* component_getFactoryFunc )(const sal_Char *pImplName, void *pServiceManager, void *pRegistryKey)
 Function pointer declaration.
typedef
::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface >(* 
cppu::ComponentFactoryFunc )(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const &xContext)
 Function pointer declaration.
typedef
::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface >(* 
cppu::ComponentInstantiation )(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rServiceManager)
 Deprecated.

Functions

CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference
< ::com::sun::star::lang::XSingleComponentFactory > 
cppu::createSingleComponentFactory (ComponentFactoryFunc fptr,::rtl::OUString const &rImplementationName,::com::sun::star::uno::Sequence< ::rtl::OUString > const &rServiceNames, rtl_ModuleCount *pModCount=0) throw ()
 Creates a single component factory supporting the XSingleComponentFactory interface.
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference
< ::com::sun::star::lang::XSingleComponentFactory > 
cppu::createOneInstanceComponentFactory (ComponentFactoryFunc fptr,::rtl::OUString const &rImplementationName,::com::sun::star::uno::Sequence< ::rtl::OUString > const &rServiceNames, rtl_ModuleCount *pModCount=0) throw ()
 Creates a single service factory which holds the instance created only once.
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference
< ::com::sun::star::lang::XSingleServiceFactory > 
cppu::createSingleFactory (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rImplementationName, ComponentInstantiation pCreateFunction, const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rServiceNames, rtl_ModuleCount *pModCount=0) throw ()
 Deprecated.
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference
< ::com::sun::star::lang::XSingleServiceFactory > 
cppu::createFactoryProxy (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rServiceManager, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > &rFactory) throw ()
 Deprecated.
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference
< ::com::sun::star::lang::XSingleServiceFactory > 
cppu::createOneInstanceFactory (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rComponentName, ComponentInstantiation pCreateFunction, const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rServiceNames, rtl_ModuleCount *pModCount=0) throw ()
 Deprecated.
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference
< ::com::sun::star::lang::XSingleServiceFactory > 
cppu::createSingleRegistryFactory (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rImplementationName, const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > &rImplementationKey) throw ()
 Deprecated.
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference
< ::com::sun::star::lang::XSingleServiceFactory > 
cppu::createOneInstanceRegistryFactory (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rComponentName, const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > &rImplementationKey) throw ()
 Deprecated.

Define Documentation

#define COMPONENT_GETDESCRIPTION   "component_getDescription"
#define COMPONENT_GETENV   "component_getImplementationEnvironment"
#define COMPONENT_GETENVEXT   "component_getImplementationEnvironmentExt"
#define COMPONENT_GETFACTORY   "component_getFactory"
#define COMPONENT_WRITEINFO   "component_writeInfo"

Typedef Documentation

typedef const sal_Char*( * component_getDescriptionFunc)(void)

Function pointer declaration.

Function retrieves a component description.

Returns:
an XML formatted string containing a short component description
Deprecated:
typedef void*( * component_getFactoryFunc)(const sal_Char *pImplName, void *pServiceManager, void *pRegistryKey)

Function pointer declaration.

Retrieves a factory to create component instances.

Parameters:
pImplNamedesired implementation name
pServiceManagera service manager (the type is XMultiServiceFactory that can be used by the environment returned by component_getImplementationEnvironment)
pRegistryKeya registry key (the type is XRegistryKey that can be used by the environment returned by component_getImplementationEnvironment)
Returns:
acquired component factory (the type is lang::XSingleComponentFactory or lang::XSingleServiceFactory to be used by the environment returned by component_getImplementationEnvironment)
typedef void( * component_getImplementationEnvironmentExtFunc)(sal_Char const **ppEnvTypeName, uno_Environment **ppEnv, sal_Char const *pImplName, uno_Environment *pTargetEnv)

Function pointer declaration.

Function determines the environment of the component implementation, i.e. the compiler. If the environment is NOT session specific (needs no additional context), then this function should return the environment type name and leave ppEnv (to 0).

Parameters:
ppEnvTypeNameenvironment type name; string must be a constant
ppEnvfunction returns an environment if the environment is session specific, i.e. has special context
pImplName
typedef void( * component_getImplementationEnvironmentFunc)(const sal_Char **ppEnvTypeName, uno_Environment **ppEnv)

Function pointer declaration.

Function determines the environment of the component implementation, i.e. which compiler compiled it. If the environment is NOT session specific (needs no additional context), then this function should return the environment type name and leave ppEnv (to 0).

Parameters:
ppEnvTypeNameenvironment type name; string must be constant
ppEnvfunction returns its environment if the environment is session specific, i.e. has special context
typedef sal_Bool( * component_writeInfoFunc)(void *pServiceManager, void *pRegistryKey)

Function pointer declaration.

Deprecated:
component_writeInfo should no longer be used in new components

Function writes component registry info, at least writing the supported service names.

Parameters:
pServiceManagera service manager (the type is an XMultiServiceFactory that can be used by the environment returned by component_getImplementationEnvironment)
pRegistryKeya registry key (the type is XRegistryKey that can be used by the environment returned by component_getImplementationEnvironment)
Returns:
true if everything went fine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines