2013-04-17 16:43:13 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INCLUDED_CPPUHELPER_SOURCE_TYPEMANAGER_HXX
|
|
|
|
#define INCLUDED_CPPUHELPER_SOURCE_TYPEMANAGER_HXX
|
|
|
|
|
2014-06-04 16:23:19 +02:00
|
|
|
#include <sal/config.h>
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2014-06-04 16:23:19 +02:00
|
|
|
#include <com/sun/star/container/ElementExistException.hpp>
|
|
|
|
#include <com/sun/star/container/NoSuchElementException.hpp>
|
|
|
|
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
|
|
|
|
#include <com/sun/star/container/XSet.hpp>
|
|
|
|
#include <com/sun/star/lang/IllegalArgumentException.hpp>
|
|
|
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
|
|
#include <com/sun/star/reflection/InvalidTypeNameException.hpp>
|
|
|
|
#include <com/sun/star/reflection/NoSuchTypeNameException.hpp>
|
|
|
|
#include <com/sun/star/reflection/TypeDescriptionSearchDepth.hpp>
|
|
|
|
#include <com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp>
|
|
|
|
#include <com/sun/star/uno/Reference.hxx>
|
|
|
|
#include <com/sun/star/uno/RuntimeException.hpp>
|
|
|
|
#include <com/sun/star/uno/Sequence.hxx>
|
|
|
|
#include <cppuhelper/basemutex.hxx>
|
2016-12-07 08:59:42 +01:00
|
|
|
#include <cppuhelper/compbase.hxx>
|
2014-06-04 16:23:19 +02:00
|
|
|
#include <rtl/ref.hxx>
|
|
|
|
#include <sal/types.h>
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
namespace com { namespace sun { namespace star {
|
|
|
|
namespace uno { class Any; }
|
|
|
|
namespace reflection { class XTypeDescription; }
|
|
|
|
} } }
|
|
|
|
namespace rtl { class OUString; }
|
|
|
|
namespace unoidl {
|
|
|
|
class ConstantGroupEntity;
|
|
|
|
class Entity;
|
|
|
|
class EnumTypeEntity;
|
|
|
|
class Manager;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace cppuhelper {
|
|
|
|
|
2016-12-07 08:59:42 +01:00
|
|
|
typedef cppu::WeakComponentImplHelper<
|
2013-04-17 16:43:13 +02:00
|
|
|
css::lang::XServiceInfo, css::container::XHierarchicalNameAccess,
|
|
|
|
css::container::XSet, css::reflection::XTypeDescriptionEnumerationAccess >
|
|
|
|
TypeManager_Base;
|
|
|
|
|
2014-03-18 12:58:46 +01:00
|
|
|
class TypeManager: private cppu::BaseMutex, public TypeManager_Base {
|
2013-04-17 16:43:13 +02:00
|
|
|
public:
|
2013-05-08 12:29:53 +02:00
|
|
|
TypeManager();
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
using TypeManager_Base::acquire;
|
|
|
|
using TypeManager_Base::release;
|
|
|
|
|
2013-05-08 12:29:53 +02:00
|
|
|
void init(rtl::OUString const & rdbUris);
|
|
|
|
|
2013-04-17 16:43:13 +02:00
|
|
|
css::uno::Any find(rtl::OUString const & name);
|
|
|
|
|
|
|
|
css::uno::Reference< css::reflection::XTypeDescription > resolve(
|
|
|
|
rtl::OUString const & name);
|
|
|
|
|
|
|
|
private:
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~TypeManager() throw () override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SAL_CALL disposing() override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual rtl::OUString SAL_CALL getImplementationName() override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual css::uno::Sequence< rtl::OUString > SAL_CALL
|
2017-01-26 12:28:58 +01:00
|
|
|
getSupportedServiceNames() override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual css::uno::Any SAL_CALL getByHierarchicalName(
|
2017-01-26 12:28:58 +01:00
|
|
|
rtl::OUString const & aName) override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual sal_Bool SAL_CALL hasByHierarchicalName(rtl::OUString const & aName) override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Type SAL_CALL getElementType() override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual sal_Bool SAL_CALL hasElements() override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
|
2017-01-26 12:28:58 +01:00
|
|
|
createEnumeration() override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual sal_Bool SAL_CALL has(css::uno::Any const & aElement) override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL insert(css::uno::Any const & aElement) override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void SAL_CALL remove(css::uno::Any const & aElement) override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual css::uno::Reference< css::reflection::XTypeDescriptionEnumeration >
|
|
|
|
SAL_CALL createTypeDescriptionEnumeration(
|
|
|
|
rtl::OUString const & moduleName,
|
|
|
|
css::uno::Sequence< css::uno::TypeClass > const & types,
|
2017-01-26 12:28:58 +01:00
|
|
|
css::reflection::TypeDescriptionSearchDepth depth) override;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
void readRdbDirectory(rtl::OUString const & uri, bool optional);
|
|
|
|
|
|
|
|
void readRdbFile(rtl::OUString const & uri, bool optional);
|
|
|
|
|
|
|
|
css::uno::Any getSequenceType(rtl::OUString const & name);
|
|
|
|
|
|
|
|
css::uno::Any getInstantiatedStruct(
|
|
|
|
rtl::OUString const & name, sal_Int32 separator);
|
|
|
|
|
|
|
|
css::uno::Any getInterfaceMember(
|
|
|
|
rtl::OUString const & name, sal_Int32 separator);
|
|
|
|
|
|
|
|
css::uno::Any getNamed(
|
2013-09-12 13:15:08 +02:00
|
|
|
rtl::OUString const & name,
|
|
|
|
rtl::Reference< unoidl::Entity > const & entity);
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2015-03-27 08:44:52 +02:00
|
|
|
static css::uno::Any getEnumMember(
|
2013-09-12 13:15:08 +02:00
|
|
|
rtl::Reference< unoidl::EnumTypeEntity > const & entity,
|
2013-04-17 16:43:13 +02:00
|
|
|
rtl::OUString const & member);
|
|
|
|
|
2015-03-27 08:44:52 +02:00
|
|
|
static css::uno::Any getConstant(
|
2013-04-26 10:37:56 +02:00
|
|
|
rtl::OUString const & constantGroupName,
|
2013-09-12 13:15:08 +02:00
|
|
|
rtl::Reference< unoidl::ConstantGroupEntity > const & entity,
|
2013-04-17 16:43:13 +02:00
|
|
|
rtl::OUString const & member);
|
|
|
|
|
|
|
|
rtl::Reference< unoidl::Entity > findEntity(rtl::OUString const & name);
|
|
|
|
|
|
|
|
rtl::Reference< unoidl::Manager > manager_;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|