19#ifndef INCLUDED_COMPHELPER_SERVICEDECL_HXX
20#define INCLUDED_COMPHELPER_SERVICEDECL_HXX
23#include <com/sun/star/uno/XComponentContext.hpp>
24#include <com/sun/star/lang/XServiceInfo.hpp>
27#include <initializer_list>
34typedef ::std::function<
35 css::uno::Reference<css::uno::XInterface>
37 css::uno::Sequence<css::uno::Any>
const&,
38 css::uno::Reference<css::uno::XComponentContext>
const&)>
CreateFuncF;
106 template <
typename ImplClassT>
108 char const* pImplName,
109 char const* pSupportedServiceNames )
110 : m_createFunc(implClass.m_createFunc),
111 m_pImplName(pImplName),
112 m_pServiceNames(pSupportedServiceNames) {}
115 void * getFactory(
char const* pImplName )
const;
148 std::initializer_list<ServiceDecl const *> args );
Class to declare a service implementation.
ServiceDecl(ImplClassT const &implClass, char const *pImplName, char const *pSupportedServiceNames)
detail::CreateFuncF const m_createFunc
ServiceDecl(const ServiceDecl &)=delete
Ctor for multiple supported service names.
char const *const m_pImplName
char const *const m_pServiceNames
ServiceDecl & operator=(const ServiceDecl &)=delete
#define COMPHELPER_DLLPUBLIC
::std::function< css::uno::Reference< css::uno::XInterface >(ServiceDecl const &, css::uno::Sequence< css::uno::Any > const &, css::uno::Reference< css::uno::XComponentContext > const &)> CreateFuncF
void * component_getFactoryHelper(const char *pImplName, std::initializer_list< ServiceDecl const * > args)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
To specify whether the implementation class expects arguments (uno::Sequence<uno::Any>).