LibreOffice: cppuhelper/factory.hxx Source File

LibreOffice LibreOffice 5.1 SDK C/C++ API Reference

factory.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19 #ifndef INCLUDED_CPPUHELPER_FACTORY_HXX
20 #define INCLUDED_CPPUHELPER_FACTORY_HXX
21
22 #include <sal/config.h>
23
24 #include <cstddef>
25
26 #include <rtl/ustring.hxx>
27 #include <rtl/unload.h>
28
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
31 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
32 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
33 #include <com/sun/star/registry/XRegistryKey.hpp>
34 #include <cppuhelper/cppuhelperdllapi.h>
35
36
37
38 #define COMPONENT_GETENV "component_getImplementationEnvironment"
39 #define COMPONENT_GETENVEXT "component_getImplementationEnvironmentExt"
40 #define COMPONENT_WRITEINFO "component_writeInfo"
41 #define COMPONENT_GETFACTORY "component_getFactory"
42
43 typedef struct _uno_Environment uno_Environment;
44
54 typedef void (SAL_CALL * component_getImplementationEnvironmentFunc)(
55 const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv );
56
67 typedef void (SAL_CALL * component_getImplementationEnvironmentExtFunc)(
68 sal_Char const ** ppEnvTypeName,
69 uno_Environment ** ppEnv,
70 sal_Char const * pImplName,
71 uno_Environment * pTargetEnv
72 );
73
80 typedef const sal_Char * (SAL_CALL * component_getDescriptionFunc)(void);
81
96 typedef sal_Bool (SAL_CALL * component_writeInfoFunc)(
97 void * pServiceManager, void * pRegistryKey );
98
114 typedef void * (SAL_CALL * component_getFactoryFunc)(
115 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
116
117
118
119 namespace cppu
120 {
121
128 typedef css::uno::Reference< css::uno::XInterface >(
129 SAL_CALL * ComponentFactoryFunc)(
130 css::uno::Reference< css::uno::XComponentContext > const & xContext );
131
140 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory >
141 SAL_CALL createSingleComponentFactory(
142 ComponentFactoryFunc fptr,
143 ::rtl::OUString const & rImplementationName,
144 css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
145 rtl_ModuleCount * pModCount = NULL );
146
157 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory > SAL_CALL
158 createOneInstanceComponentFactory(
159 ComponentFactoryFunc fptr,
160 ::rtl::OUString const & rImplementationName,
161 css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
162 rtl_ModuleCount * pModCount = NULL );
163
170 typedef css::uno::Reference< css::uno::XInterface >(SAL_CALL * ComponentInstantiation)(
171 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager );
172
187 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
188 createSingleFactory(
189 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
190 const ::rtl::OUString & rImplementationName,
191 ComponentInstantiation pCreateFunction,
192 const css::uno::Sequence< ::rtl::OUString > & rServiceNames,
193 rtl_ModuleCount * pModCount = NULL );
194
209 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
210 createFactoryProxy(
211 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
212 const css::uno::Reference< css::lang::XSingleServiceFactory > & rFactory );
213
228 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
229 createOneInstanceFactory(
230 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
231 const ::rtl::OUString & rComponentName,
232 ComponentInstantiation pCreateFunction,
233 const css::uno::Sequence< ::rtl::OUString > & rServiceNames,
234 rtl_ModuleCount * pModCount = NULL );
235
245 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
246 createSingleRegistryFactory(
247 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
248 const ::rtl::OUString & rImplementationName,
249 const css::uno::Reference< css::registry::XRegistryKey > & rImplementationKey );
250
263 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
264 createOneInstanceRegistryFactory(
265 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
266 const ::rtl::OUString & rComponentName,
267 const css::uno::Reference< css::registry::XRegistryKey > & rImplementationKey );
268
269 }
270
271 #endif
272
273 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
CPPUHELPER_DLLPUBLIC
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:28
cppu::createFactoryProxy
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > createFactoryProxy(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager, const css::uno::Reference< css::lang::XSingleServiceFactory > &rFactory)
Deprecated.
component_getImplementationEnvironmentExtFunc
void(* component_getImplementationEnvironmentExtFunc)(sal_Char const **ppEnvTypeName, uno_Environment **ppEnv, sal_Char const *pImplName, uno_Environment *pTargetEnv)
Function pointer declaration.
Definition: factory.hxx:67
rtl_ModuleCount
struct SAL_DLLPUBLIC_RTTI _rtl_ModuleCount rtl_ModuleCount
Backwards-compatibility remainder of a removed library unloading feature.
unload.h
Backwards-compatibility remainders of a removed library unloading feature.
cppu::ComponentInstantiation
css::uno::Reference< css::uno::XInterface >(* ComponentInstantiation)(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager)
Deprecated.
Definition: factory.hxx:170
cppu::ComponentFactoryFunc
css::uno::Reference< css::uno::XInterface >(* ComponentFactoryFunc)(css::uno::Reference< css::uno::XComponentContext > const &xContext)
Function pointer declaration.
Definition: factory.hxx:129
ustring.hxx
component_writeInfoFunc
sal_Bool(* component_writeInfoFunc)(void *pServiceManager, void *pRegistryKey)
Function pointer declaration.
Definition: factory.hxx:96
cppu::createSingleFactory
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > createSingleFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rImplementationName, ComponentInstantiation pCreateFunction, const css::uno::Sequence< ::rtl::OUString > &rServiceNames, rtl_ModuleCount *pModCount=NULL)
Deprecated.
sal_Bool
unsigned char sal_Bool
Definition: types.h:48
component_getDescriptionFunc
const sal_Char *(* component_getDescriptionFunc)(void)
Function pointer declaration.
Definition: factory.hxx:80
cppu
Definition: Enterable.hxx:26
component_getFactoryFunc
void *(* component_getFactoryFunc)(const sal_Char *pImplName, void *pServiceManager, void *pRegistryKey)
Function pointer declaration.
Definition: factory.hxx:114
cppu::createOneInstanceRegistryFactory
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > createOneInstanceRegistryFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rComponentName, const css::uno::Reference< css::registry::XRegistryKey > &rImplementationKey)
Deprecated.
cppu::createSingleComponentFactory
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory > createSingleComponentFactory(ComponentFactoryFunc fptr, ::rtl::OUString const &rImplementationName, css::uno::Sequence< ::rtl::OUString > const &rServiceNames, rtl_ModuleCount *pModCount=NULL)
Creates a single component factory supporting the XSingleComponentFactory interface.
uno_Environment
struct SAL_DLLPUBLIC_RTTI _uno_Environment uno_Environment
The binary specification of an UNO environment.
config.h
rtl::OUString
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:106
cppu::createSingleRegistryFactory
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > createSingleRegistryFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rImplementationName, const css::uno::Reference< css::registry::XRegistryKey > &rImplementationKey)
Deprecated.
cppuhelperdllapi.h
component_getImplementationEnvironmentFunc
void(* component_getImplementationEnvironmentFunc)(const sal_Char **ppEnvTypeName, uno_Environment **ppEnv)
Function pointer declaration.
Definition: factory.hxx:54
sal_Char
char sal_Char
A legacy synonym for char.
Definition: types.h:130
_uno_Environment
The binary specification of an UNO environment.
Definition: environment.h:41
cppu::createOneInstanceComponentFactory
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory > createOneInstanceComponentFactory(ComponentFactoryFunc fptr, ::rtl::OUString const &rImplementationName, css::uno::Sequence< ::rtl::OUString > const &rServiceNames, rtl_ModuleCount *pModCount=NULL)
Creates a single service factory which holds the instance created only once.
cppu::createOneInstanceFactory
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > createOneInstanceFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager, const ::rtl::OUString &rComponentName, ComponentInstantiation pCreateFunction, const css::uno::Sequence< ::rtl::OUString > &rServiceNames, rtl_ModuleCount *pModCount=NULL)
Deprecated.