LibreOffice LibreOffice 26.2 SDK C/C++ API Reference

Loading...
Searching...
No Matches
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
20/*
21 * This file is part of LibreOffice published API.
22 */
23#ifndef INCLUDED_CPPUHELPER_FACTORY_HXX
24#define INCLUDED_CPPUHELPER_FACTORY_HXX
25
26#include "sal/config.h"
27
28#include <cstddef>
29
30#include "rtl/ustring.hxx"
31#include "rtl/unload.h"
32
33#include "com/sun/star/uno/Reference.h"
34#include "cppuhelper/cppuhelperdllapi.h"
35
36 namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } }
37 namespace com { namespace sun { namespace star { namespace lang { class XSingleComponentFactory; } } } }
38 namespace com { namespace sun { namespace star { namespace lang { class XSingleServiceFactory; } } } }
39 namespace com { namespace sun { namespace star { namespace registry { class XRegistryKey; } } } }
40 namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
41 namespace com { namespace sun { namespace star { namespace uno { class XInterface; } } } }
42 namespace com { namespace sun { namespace star { namespace uno { template <class E> class Sequence; } } } }
43
44#define COMPONENT_GETENV "component_getImplementationEnvironment"
45#define COMPONENT_GETENVEXT "component_getImplementationEnvironmentExt"
46#define COMPONENT_WRITEINFO "component_writeInfo"
47#define COMPONENT_GETFACTORY "component_getFactory"
48
49 typedef struct _uno_Environment uno_Environment;
50
60 typedef void (SAL_CALL * component_getImplementationEnvironmentFunc)(
61 const char ** ppEnvTypeName, uno_Environment ** ppEnv );
62
73 typedef void (SAL_CALL * component_getImplementationEnvironmentExtFunc)(
74 char const ** ppEnvTypeName,
75 uno_Environment ** ppEnv,
76 char const * pImplName,
77 uno_Environment * pTargetEnv
78);
79
86 typedef const char * (SAL_CALL * component_getDescriptionFunc)(void);
87
102 typedef sal_Bool (SAL_CALL * component_writeInfoFunc)(
103 void * pServiceManager, void * pRegistryKey );
104
120 typedef void * (SAL_CALL * component_getFactoryFunc)(
121 const char * pImplName, void * pServiceManager, void * pRegistryKey );
122
123
124 namespace cppu
125{
126
133 typedef css::uno::Reference< css::uno::XInterface >(
134 SAL_CALL * ComponentFactoryFunc)(
135 css::uno::Reference< css::uno::XComponentContext > const & xContext );
136
145 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory >
146SAL_CALL createSingleComponentFactory(
147 ComponentFactoryFunc fptr,
148 ::rtl::OUString const & rImplementationName,
149 css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
150 rtl_ModuleCount * pModCount = NULL );
151
162 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleComponentFactory > SAL_CALL
163 createOneInstanceComponentFactory(
164 ComponentFactoryFunc fptr,
165 ::rtl::OUString const & rImplementationName,
166 css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
167 rtl_ModuleCount * pModCount = NULL );
168
175 typedef css::uno::Reference< css::uno::XInterface >(SAL_CALL * ComponentInstantiation)(
176 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager );
177
192 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
193 createSingleFactory(
194 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
195 const ::rtl::OUString & rImplementationName,
196 ComponentInstantiation pCreateFunction,
197 const css::uno::Sequence< ::rtl::OUString > & rServiceNames,
198 rtl_ModuleCount * pModCount = NULL );
199
214 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
215 createFactoryProxy(
216 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
217 const css::uno::Reference< css::lang::XSingleServiceFactory > & rFactory );
218
233 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
234 createOneInstanceFactory(
235 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
236 const ::rtl::OUString & rComponentName,
237 ComponentInstantiation pCreateFunction,
238 const css::uno::Sequence< ::rtl::OUString > & rServiceNames,
239 rtl_ModuleCount * pModCount = NULL );
240
250 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
251 createSingleRegistryFactory(
252 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
253 const ::rtl::OUString & rImplementationName,
254 const css::uno::Reference< css::registry::XRegistryKey > & rImplementationKey );
255
268 CPPUHELPER_DLLPUBLIC css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL
269 createOneInstanceRegistryFactory(
270 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager,
271 const ::rtl::OUString & rComponentName,
272 const css::uno::Reference< css::registry::XRegistryKey > & rImplementationKey );
273
274}
275
276#endif
277
278/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Bool
unsigned char sal_Bool
Definition types.h:38
config.h
ustring.hxx
unload.h
Backwards-compatibility remainders of a removed library unloading feature.
rtl_ModuleCount
struct SAL_DLLPUBLIC_RTTI _rtl_ModuleCount rtl_ModuleCount
Backwards-compatibility remainder of a removed library unloading feature.
uno_Environment
struct SAL_DLLPUBLIC_RTTI _uno_Environment uno_Environment
The binary specification of a UNO environment.
component_getDescriptionFunc
const char *(* component_getDescriptionFunc)(void)
Function pointer declaration.
Definition factory.hxx:86
component_getFactoryFunc
void *(* component_getFactoryFunc)(const char *pImplName, void *pServiceManager, void *pRegistryKey)
Function pointer declaration.
Definition factory.hxx:120
component_getImplementationEnvironmentFunc
void(* component_getImplementationEnvironmentFunc)(const char **ppEnvTypeName, uno_Environment **ppEnv)
Function pointer declaration.
Definition factory.hxx:60
component_getImplementationEnvironmentExtFunc
void(* component_getImplementationEnvironmentExtFunc)(char const **ppEnvTypeName, uno_Environment **ppEnv, char const *pImplName, uno_Environment *pTargetEnv)
Function pointer declaration.
Definition factory.hxx:73
component_writeInfoFunc
sal_Bool(* component_writeInfoFunc)(void *pServiceManager, void *pRegistryKey)
Function pointer declaration.
Definition factory.hxx:102
cppuhelperdllapi.h
CPPUHELPER_DLLPUBLIC
#define CPPUHELPER_DLLPUBLIC
Definition cppuhelperdllapi.h:32
Reference.h
com
Definition types.h:377
com::sun
Definition types.h:377
com::sun::star
Definition types.h:377
com::sun::star::uno
Definition typedescription.hxx:43
cppu
Definition Enterable.hxx:31
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.
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.
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::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.
cppu::ComponentFactoryFunc
css::uno::Reference< css::uno::XInterface >(* ComponentFactoryFunc)(css::uno::Reference< css::uno::XComponentContext > const &xContext)
Function pointer declaration.
Definition factory.hxx:134
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.
cppu::ComponentInstantiation
css::uno::Reference< css::uno::XInterface >(* ComponentInstantiation)(const css::uno::Reference< css::lang::XMultiServiceFactory > &rServiceManager)
Deprecated.
Definition factory.hxx:175
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.
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.
com::sun::star::lang
Definition factory.hxx:36
com::sun::star::registry
Definition factory.hxx:39
rtl::OUString
This String class provides base functionality for C++ like Unicode character array handling.
Definition ustring.hxx:172
_uno_Environment
The binary specification of a UNO environment.
Definition environment.h:46
com::sun::star::uno::Reference< css::uno::XInterface >
com::sun::star::uno::Sequence
Template C++ class representing an IDL sequence.
Definition Sequence.h:61