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
|
|
|
|
|
|
|
|
#include "sal/config.h"
|
|
|
|
|
|
|
|
#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"
|
2014-03-18 12:58:46 +01:00
|
|
|
#include "cppuhelper/basemutex.hxx"
|
2013-04-17 16:43:13 +02:00
|
|
|
#include "cppuhelper/compbase4.hxx"
|
|
|
|
#include "rtl/ref.hxx"
|
|
|
|
#include "sal/types.h"
|
|
|
|
|
|
|
|
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 {
|
|
|
|
|
|
|
|
typedef cppu::WeakComponentImplHelper4<
|
|
|
|
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:
|
|
|
|
virtual ~TypeManager() throw ();
|
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual void SAL_CALL disposing() SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual rtl::OUString SAL_CALL getImplementationName()
|
2014-03-26 16:37:00 +01:00
|
|
|
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName)
|
2014-03-26 16:37:00 +01:00
|
|
|
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual css::uno::Sequence< rtl::OUString > SAL_CALL
|
2014-03-26 16:37:00 +01:00
|
|
|
getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual css::uno::Any SAL_CALL getByHierarchicalName(
|
|
|
|
rtl::OUString const & aName)
|
|
|
|
throw (
|
2014-03-26 16:37:00 +01:00
|
|
|
css::container::NoSuchElementException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual sal_Bool SAL_CALL hasByHierarchicalName(rtl::OUString const & aName)
|
2014-03-26 16:37:00 +01:00
|
|
|
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual css::uno::Type SAL_CALL getElementType()
|
2014-03-26 16:37:00 +01:00
|
|
|
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
|
2014-03-26 16:37:00 +01:00
|
|
|
createEnumeration() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual sal_Bool SAL_CALL has(css::uno::Any const & aElement)
|
2014-03-26 16:37:00 +01:00
|
|
|
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual void SAL_CALL insert(css::uno::Any const & aElement)
|
|
|
|
throw (
|
|
|
|
css::lang::IllegalArgumentException,
|
2014-03-26 16:37:00 +01:00
|
|
|
css::container::ElementExistException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
virtual void SAL_CALL remove(css::uno::Any const & aElement)
|
|
|
|
throw (
|
|
|
|
css::lang::IllegalArgumentException,
|
2014-03-26 16:37:00 +01:00
|
|
|
css::container::NoSuchElementException, css::uno::RuntimeException, std::exception) SAL_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,
|
|
|
|
css::reflection::TypeDescriptionSearchDepth depth)
|
|
|
|
throw (
|
|
|
|
css::reflection::NoSuchTypeNameException,
|
|
|
|
css::reflection::InvalidTypeNameException,
|
2014-03-26 16:37:00 +01:00
|
|
|
css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2013-04-17 16:43:13 +02:00
|
|
|
|
|
|
|
void readRdbs(rtl::OUString const & uris);
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
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: */
|