LibreOffice Module cppuhelper (master) 1
typemanager.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
10#pragma once
11
12#include <sal/config.h>
13
14#include <cstddef>
15
16#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
17#include <com/sun/star/container/XSet.hpp>
18#include <com/sun/star/lang/XServiceInfo.hpp>
19#include <com/sun/star/reflection/TypeDescriptionSearchDepth.hpp>
20#include <com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp>
21#include <com/sun/star/uno/Reference.hxx>
22#include <com/sun/star/uno/Sequence.hxx>
23#include <compbase2.hxx>
24#include <rtl/ref.hxx>
25#include <sal/types.h>
26
27namespace com::sun::star {
28 namespace reflection { class XTypeDescription; }
29}
30namespace unoidl {
31 class ConstantGroupEntity;
32 class Entity;
33 class EnumTypeEntity;
34 class Manager;
35}
36
37namespace cppuhelper {
38
39typedef WeakComponentImplHelper2<
40 css::lang::XServiceInfo, css::container::XHierarchicalNameAccess,
41 css::container::XSet, css::reflection::XTypeDescriptionEnumerationAccess >
43
45public:
47
50
51 void init(std::u16string_view rdbUris);
52
53 css::uno::Any find(OUString const & name);
54
55 css::uno::Reference< css::reflection::XTypeDescription > resolve(
56 OUString const & name);
57
58private:
59 virtual ~TypeManager() noexcept override;
60
61 virtual OUString SAL_CALL getImplementationName() override;
62
63 virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
64
65 virtual css::uno::Sequence< OUString > SAL_CALL
66 getSupportedServiceNames() override;
67
68 virtual css::uno::Any SAL_CALL getByHierarchicalName(
69 OUString const & aName) override;
70
71 virtual sal_Bool SAL_CALL hasByHierarchicalName(OUString const & aName) override;
72
73 virtual css::uno::Type SAL_CALL getElementType() override;
74
75 virtual sal_Bool SAL_CALL hasElements() override;
76
77 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
78 createEnumeration() override;
79
80 virtual sal_Bool SAL_CALL has(css::uno::Any const & aElement) override;
81
82 virtual void SAL_CALL insert(css::uno::Any const & aElement) override;
83
84 virtual void SAL_CALL remove(css::uno::Any const & aElement) override;
85
86 virtual css::uno::Reference< css::reflection::XTypeDescriptionEnumeration >
88 OUString const & moduleName,
89 css::uno::Sequence< css::uno::TypeClass > const & types,
90 css::reflection::TypeDescriptionSearchDepth depth) override;
91
92 void readRdbDirectory(std::u16string_view uri, bool optional);
93
94 void readRdbFile(std::u16string_view uri, bool optional);
95
96 css::uno::Any getSequenceType(OUString const & name);
97
98 css::uno::Any getInstantiatedStruct(
99 OUString const & name, sal_Int32 separator);
100
101 css::uno::Any getInterfaceMember(
102 std::u16string_view name, std::size_t separator);
103
104 css::uno::Any getNamed(
105 OUString const & name,
106 rtl::Reference< unoidl::Entity > const & entity);
107
108 static css::uno::Any getEnumMember(
110 std::u16string_view member);
111
112 static css::uno::Any getConstant(
113 std::u16string_view constantGroupName,
115 std::u16string_view member);
116
118
120};
121
122}
123
124/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL hasElements() override
static css::uno::Any getEnumMember(rtl::Reference< unoidl::EnumTypeEntity > const &entity, std::u16string_view member)
virtual void SAL_CALL remove(css::uno::Any const &aElement) override
virtual css::uno::Reference< css::reflection::XTypeDescriptionEnumeration > SAL_CALL createTypeDescriptionEnumeration(OUString const &moduleName, css::uno::Sequence< css::uno::TypeClass > const &types, css::reflection::TypeDescriptionSearchDepth depth) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual css::uno::Any SAL_CALL getByHierarchicalName(OUString const &aName) override
css::uno::Reference< css::reflection::XTypeDescription > resolve(OUString const &name)
virtual sal_Bool SAL_CALL has(css::uno::Any const &aElement) override
css::uno::Any find(OUString const &name)
virtual ~TypeManager() noexcept override
rtl::Reference< unoidl::Entity > findEntity(OUString const &name)
virtual void SAL_CALL insert(css::uno::Any const &aElement) override
void readRdbDirectory(std::u16string_view uri, bool optional)
css::uno::Any getNamed(OUString const &name, rtl::Reference< unoidl::Entity > const &entity)
css::uno::Any getInterfaceMember(std::u16string_view name, std::size_t separator)
css::uno::Any getInstantiatedStruct(OUString const &name, sal_Int32 separator)
rtl::Reference< unoidl::Manager > manager_
virtual sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
virtual css::uno::Type SAL_CALL getElementType() override
css::uno::Any getSequenceType(OUString const &name)
void init(std::u16string_view rdbUris)
void readRdbFile(std::u16string_view uri, bool optional)
virtual sal_Bool SAL_CALL hasByHierarchicalName(OUString const &aName) override
static css::uno::Any getConstant(std::u16string_view constantGroupName, rtl::Reference< unoidl::ConstantGroupEntity > const &entity, std::u16string_view member)
virtual void SAL_CALL release() noexcept override
decreasing m_refCount
virtual void SAL_CALL acquire() noexcept override
increasing m_refCount
const char * name
OUString aName
This is a straight copy of the include/comphelper/compbase.hxx file, copied here because it is nigh i...
Definition: compbase.cxx:15
WeakComponentImplHelper2< css::lang::XServiceInfo, css::container::XHierarchicalNameAccess, css::container::XSet, css::reflection::XTypeDescriptionEnumerationAccess > TypeManager_Base
Definition: typemanager.hxx:42
unsigned char sal_Bool