LibreOffice LibreOffice 4.3 SDK C/C++ API Reference

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 <rtl/ustring.hxx>
23 #include <uno/dispatcher.h>
24 #include <rtl/unload.h>
25
26 #include <com/sun/star/uno/XComponentContext.hpp>
27 #include <com/sun/star/lang/XSingleComponentFactory.hpp>
28 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
29 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
30 #include <com/sun/star/registry/XRegistryKey.hpp>
31 #include <cppuhelper/cppuhelperdllapi.h>
32
33
34
35 #define COMPONENT_GETENV "component_getImplementationEnvironment"
36 #define COMPONENT_GETENVEXT "component_getImplementationEnvironmentExt"
37 #define COMPONENT_GETDESCRIPTION "component_getDescription"
38 #define COMPONENT_WRITEINFO "component_writeInfo"
39 #define COMPONENT_GETFACTORY "component_getFactory"
40
41 typedef struct _uno_Environment uno_Environment;
42
52 typedef void (SAL_CALL * component_getImplementationEnvironmentFunc)(
53 const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv );
54
65 typedef void (SAL_CALL * component_getImplementationEnvironmentExtFunc)(
66 sal_Char const ** ppEnvTypeName,
67 uno_Environment ** ppEnv,
68 sal_Char const * pImplName,
69 uno_Environment * pTargetEnv
70 );
71
78 typedef const sal_Char * (SAL_CALL * component_getDescriptionFunc)(void);
79
94 typedef sal_Bool (SAL_CALL * component_writeInfoFunc)(
95 void * pServiceManager, void * pRegistryKey );
96
112 typedef void * (SAL_CALL * component_getFactoryFunc)(
113 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey );
114
115
116
117 namespace cppu
118 {
119
126 typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(
127 SAL_CALL * ComponentFactoryFunc)(
128 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext )
129 SAL_THROW( (::com::sun::star::uno::Exception) );
130
139 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory >
140 SAL_CALL createSingleComponentFactory(
141 ComponentFactoryFunc fptr,
142 ::rtl::OUString const & rImplementationName,
143 ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames,
144 rtl_ModuleCount * pModCount = 0 )
145 SAL_THROW(());
146
157 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > SAL_CALL
158 createOneInstanceComponentFactory(
159 ComponentFactoryFunc fptr,
160 ::rtl::OUString const & rImplementationName,
161 ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames,
162 rtl_ModuleCount * pModCount = 0 )
163 SAL_THROW(());
164
171 typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SAL_CALL * ComponentInstantiation)(
172 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager );
173
188 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
189 createSingleFactory(
190 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
191 const ::rtl::OUString & rImplementationName,
192 ComponentInstantiation pCreateFunction,
193 const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames,
194 rtl_ModuleCount * pModCount = 0 )
195 SAL_THROW(());
196
211 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
212 createFactoryProxy(
213 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
214 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > & rFactory )
215 SAL_THROW(());
216
231 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
232 createOneInstanceFactory(
233 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
234 const ::rtl::OUString & rComponentName,
235 ComponentInstantiation pCreateFunction,
236 const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames,
237 rtl_ModuleCount * pModCount = 0 )
238 SAL_THROW(());
239
249 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
250 createSingleRegistryFactory(
251 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
252 const ::rtl::OUString & rImplementationName,
253 const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey )
254 SAL_THROW(());
255
268 CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL
269 createOneInstanceRegistryFactory(
270 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager,
271 const ::rtl::OUString & rComponentName,
272 const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey )
273 SAL_THROW(());
274
275 }
276
277 #endif
278
279 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
cppu::ComponentInstantiation
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(* ComponentInstantiation)(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rServiceManager)
Deprecated.
Definition: factory.hxx:171
sal_Bool
unsigned char sal_Bool
Definition: types.h:46
rtl
Definition: bootstrap.hxx:24
dispatcher.h
component_getImplementationEnvironmentFunc
void(* component_getImplementationEnvironmentFunc)(const sal_Char **ppEnvTypeName, uno_Environment **ppEnv)
Function pointer declaration.
Definition: factory.hxx:52
component_writeInfoFunc
sal_Bool(* component_writeInfoFunc)(void *pServiceManager, void *pRegistryKey)
Function pointer declaration.
Definition: factory.hxx:94
cppu::createOneInstanceComponentFactory
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > createOneInstanceComponentFactory(ComponentFactoryFunc fptr,::rtl::OUString const &rImplementationName,::com::sun::star::uno::Sequence< ::rtl::OUString > const &rServiceNames, rtl_ModuleCount *pModCount=0) SAL_THROW(())
Creates a single service factory which holds the instance created only once.
com::sun::star::uno::Sequence
Template C++ class representing an IDL sequence.
Definition: unotype.hxx:33
cppu::createSingleFactory
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > 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) SAL_THROW(())
Deprecated.
component_getFactoryFunc
void *(* component_getFactoryFunc)(const sal_Char *pImplName, void *pServiceManager, void *pRegistryKey)
Function pointer declaration.
Definition: factory.hxx:112
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:65
cppu::createSingleRegistryFactory
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > 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) SAL_THROW(())
Deprecated.
_rtl_ModuleCount
Backwards-compatibility remainder of a removed library unloading feature.
Definition: unload.h:42
sal_Char
char sal_Char
A legacy synonym for char.
Definition: types.h:128
cppu::createFactoryProxy
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > 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) SAL_THROW(())
Deprecated.
_uno_Environment
The binary specification of an UNO environment.
Definition: environment.h:41
cppu::createOneInstanceFactory
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > 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) SAL_THROW(())
Deprecated.
cppu
Definition: Enterable.hxx:26
SAL_THROW
#define SAL_THROW(x)
Exception specification documentation.
Definition: types.h:361
cppu::createSingleComponentFactory
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*) ComponentFactoryFunc(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const &xContext) SAL_THROW((CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > createSingleComponentFactory(ComponentFactoryFunc fptr,::rtl::OUString const &rImplementationName,::com::sun::star::uno::Sequence< ::rtl::OUString > const &rServiceNames, rtl_ModuleCount *pModCount=0) SAL_THROW(())
Function pointer declaration.
Definition: factory.hxx:140
unload.h
Backwards-compatibility remainders of a removed library unloading feature.
com::sun::star::uno::Reference
Template reference class for interface type derived from BaseReference.
Definition: unotype.hxx:32
CPPUHELPER_DLLPUBLIC
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:28
component_getDescriptionFunc
const sal_Char *(* component_getDescriptionFunc)(void)
Function pointer declaration.
Definition: factory.hxx:78
rtl::OUString
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:82
ustring.hxx
cppuhelperdllapi.h
cppu::createOneInstanceRegistryFactory
CPPUHELPER_DLLPUBLIC::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > 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) SAL_THROW(())
Deprecated.
com
Definition: types.h:391