2010-10-14 08:30:07 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-12 18:11:58 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
2000-09-18 14:29:57 +00:00
|
|
|
*
|
2012-06-12 18:11:58 +01:00
|
|
|
* 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/.
|
2000-09-18 14:29:57 +00:00
|
|
|
*
|
2012-06-12 18:11:58 +01:00
|
|
|
* This file incorporates work covered by the following license notice:
|
2000-09-18 14:29:57 +00:00
|
|
|
*
|
2012-06-12 18:11:58 +01:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 14:29:57 +00:00
|
|
|
|
2006-03-15 08:11:13 +00:00
|
|
|
#ifndef INCLUDED_CODEMAKER_TYPEMANAGER_HXX
|
|
|
|
#define INCLUDED_CODEMAKER_TYPEMANAGER_HXX
|
2000-09-18 14:29:57 +00:00
|
|
|
|
2013-11-09 14:11:23 -06:00
|
|
|
#include <sal/config.h>
|
2013-04-16 17:37:01 +02:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
2013-11-09 14:11:23 -06:00
|
|
|
#include <codemaker/unotype.hxx>
|
|
|
|
#include <rtl/ref.hxx>
|
|
|
|
#include <rtl/string.hxx>
|
|
|
|
#include <rtl/textenc.h>
|
|
|
|
#include <rtl/ustring.hxx>
|
|
|
|
#include <salhelper/simplereferenceobject.hxx>
|
2000-09-18 14:29:57 +00:00
|
|
|
|
[API CHANGE] WIP: Experimental new binary type.rdb format
Make cppumaker work on top of unoidl/ instead of registry/, as a first step to
change all the various codemakers.
* API CHANGE: cppumaker no longer supports the -B switch, as that is meaningless
with the new format. When reading from an old-format .rdb file, /UCR is
hard-coded as the prefix now.
* TODO: The new format does not yet support deprecation annotations, so the
generated .hdl/.hpp files lack any SAL_DEPRECATED_INTERNALs for now.
* codemaker/typemanager.hxx is extended with access to unoidl/ functionality, so
the various codemakers can use registry/ and unoidl/ in parallel for now.
The access to registry/ functionality will be removed. (Added small throwaway
helper functions u2b/b2u to easily map between OString and OUString at the
remaining seams for now.)
* Includes a selective revert of ba044b1e9613ed30906a9a540b7da8392923e4e3
"remove needless forward rtl::OUString declarations" in those parts of
codemaker, unodevtools, unoidl that were covered by this local
work-in-progress patch; I would otherwise have hard a hard time re-applying
it.
* The generated .hdl/.hpp files are mostly unchanged, except for a few minor
things:
** Any SAL_DEPRECATED_INTERNALs are missing (see above).
** In comprehensive getCppuType definitions, some members were erroneously
classified as TypeCalss_UNKNOWN.
** In comprehensive getCppuType definitions, some unnecessary calls like
::cppu::UnoType< ::sal_Int32 >::get();
can be removed.
** For typedef sequence<X>, the .hdl file need not include X.hdl, but only needs
to forward-declare it.
** Unnecessary includes for optional bases of interfaces can be removed.
** Some numbering of local variable names (sMethodName1, ...) has changed.
Change-Id: Icad98f248ac15177337f1b4ab709a755a8af6238
2013-04-08 08:45:37 +02:00
|
|
|
namespace unoidl {
|
|
|
|
class Entity;
|
|
|
|
class Manager;
|
|
|
|
class MapCursor;
|
|
|
|
class Provider;
|
|
|
|
}
|
2000-09-18 14:29:57 +00:00
|
|
|
|
2019-10-28 21:01:40 +02:00
|
|
|
class TypeManager final : public salhelper::SimpleReferenceObject {
|
2000-09-18 14:29:57 +00:00
|
|
|
public:
|
|
|
|
TypeManager();
|
2004-03-30 15:51:19 +00:00
|
|
|
|
2013-09-13 15:26:58 +02:00
|
|
|
void loadProvider(OUString const & uri, bool primary);
|
[API CHANGE] WIP: Experimental new binary type.rdb format
Make cppumaker work on top of unoidl/ instead of registry/, as a first step to
change all the various codemakers.
* API CHANGE: cppumaker no longer supports the -B switch, as that is meaningless
with the new format. When reading from an old-format .rdb file, /UCR is
hard-coded as the prefix now.
* TODO: The new format does not yet support deprecation annotations, so the
generated .hdl/.hpp files lack any SAL_DEPRECATED_INTERNALs for now.
* codemaker/typemanager.hxx is extended with access to unoidl/ functionality, so
the various codemakers can use registry/ and unoidl/ in parallel for now.
The access to registry/ functionality will be removed. (Added small throwaway
helper functions u2b/b2u to easily map between OString and OUString at the
remaining seams for now.)
* Includes a selective revert of ba044b1e9613ed30906a9a540b7da8392923e4e3
"remove needless forward rtl::OUString declarations" in those parts of
codemaker, unodevtools, unoidl that were covered by this local
work-in-progress patch; I would otherwise have hard a hard time re-applying
it.
* The generated .hdl/.hpp files are mostly unchanged, except for a few minor
things:
** Any SAL_DEPRECATED_INTERNALs are missing (see above).
** In comprehensive getCppuType definitions, some members were erroneously
classified as TypeCalss_UNKNOWN.
** In comprehensive getCppuType definitions, some unnecessary calls like
::cppu::UnoType< ::sal_Int32 >::get();
can be removed.
** For typedef sequence<X>, the .hdl file need not include X.hdl, but only needs
to forward-declare it.
** Unnecessary includes for optional bases of interfaces can be removed.
** Some numbering of local variable names (sMethodName1, ...) has changed.
Change-Id: Icad98f248ac15177337f1b4ab709a755a8af6238
2013-04-08 08:45:37 +02:00
|
|
|
|
2013-04-11 09:27:11 +02:00
|
|
|
bool foundAtPrimaryProvider(OUString const & name) const;
|
[API CHANGE] WIP: Experimental new binary type.rdb format
Make cppumaker work on top of unoidl/ instead of registry/, as a first step to
change all the various codemakers.
* API CHANGE: cppumaker no longer supports the -B switch, as that is meaningless
with the new format. When reading from an old-format .rdb file, /UCR is
hard-coded as the prefix now.
* TODO: The new format does not yet support deprecation annotations, so the
generated .hdl/.hpp files lack any SAL_DEPRECATED_INTERNALs for now.
* codemaker/typemanager.hxx is extended with access to unoidl/ functionality, so
the various codemakers can use registry/ and unoidl/ in parallel for now.
The access to registry/ functionality will be removed. (Added small throwaway
helper functions u2b/b2u to easily map between OString and OUString at the
remaining seams for now.)
* Includes a selective revert of ba044b1e9613ed30906a9a540b7da8392923e4e3
"remove needless forward rtl::OUString declarations" in those parts of
codemaker, unodevtools, unoidl that were covered by this local
work-in-progress patch; I would otherwise have hard a hard time re-applying
it.
* The generated .hdl/.hpp files are mostly unchanged, except for a few minor
things:
** Any SAL_DEPRECATED_INTERNALs are missing (see above).
** In comprehensive getCppuType definitions, some members were erroneously
classified as TypeCalss_UNKNOWN.
** In comprehensive getCppuType definitions, some unnecessary calls like
::cppu::UnoType< ::sal_Int32 >::get();
can be removed.
** For typedef sequence<X>, the .hdl file need not include X.hdl, but only needs
to forward-declare it.
** Unnecessary includes for optional bases of interfaces can be removed.
** Some numbering of local variable names (sMethodName1, ...) has changed.
Change-Id: Icad98f248ac15177337f1b4ab709a755a8af6238
2013-04-08 08:45:37 +02:00
|
|
|
|
|
|
|
codemaker::UnoType::Sort getSort(
|
2015-11-10 10:11:36 +01:00
|
|
|
OUString const & name, rtl::Reference< unoidl::Entity > * entity = nullptr,
|
|
|
|
rtl::Reference< unoidl::MapCursor > * cursor = nullptr) const;
|
2013-03-26 14:59:34 +01:00
|
|
|
|
2013-04-12 15:21:37 +02:00
|
|
|
codemaker::UnoType::Sort decompose(
|
|
|
|
OUString const & name, bool resolveTypedefs, OUString * nucleus,
|
|
|
|
sal_Int32 * rank, std::vector< OUString > * arguments,
|
2013-04-11 09:27:11 +02:00
|
|
|
rtl::Reference< unoidl::Entity > * entity) const;
|
|
|
|
|
2013-03-26 14:59:34 +01:00
|
|
|
private:
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~TypeManager() override;
|
2000-09-18 14:29:57 +00:00
|
|
|
|
[API CHANGE] WIP: Experimental new binary type.rdb format
Make cppumaker work on top of unoidl/ instead of registry/, as a first step to
change all the various codemakers.
* API CHANGE: cppumaker no longer supports the -B switch, as that is meaningless
with the new format. When reading from an old-format .rdb file, /UCR is
hard-coded as the prefix now.
* TODO: The new format does not yet support deprecation annotations, so the
generated .hdl/.hpp files lack any SAL_DEPRECATED_INTERNALs for now.
* codemaker/typemanager.hxx is extended with access to unoidl/ functionality, so
the various codemakers can use registry/ and unoidl/ in parallel for now.
The access to registry/ functionality will be removed. (Added small throwaway
helper functions u2b/b2u to easily map between OString and OUString at the
remaining seams for now.)
* Includes a selective revert of ba044b1e9613ed30906a9a540b7da8392923e4e3
"remove needless forward rtl::OUString declarations" in those parts of
codemaker, unodevtools, unoidl that were covered by this local
work-in-progress patch; I would otherwise have hard a hard time re-applying
it.
* The generated .hdl/.hpp files are mostly unchanged, except for a few minor
things:
** Any SAL_DEPRECATED_INTERNALs are missing (see above).
** In comprehensive getCppuType definitions, some members were erroneously
classified as TypeCalss_UNKNOWN.
** In comprehensive getCppuType definitions, some unnecessary calls like
::cppu::UnoType< ::sal_Int32 >::get();
can be removed.
** For typedef sequence<X>, the .hdl file need not include X.hdl, but only needs
to forward-declare it.
** Unnecessary includes for optional bases of interfaces can be removed.
** Some numbering of local variable names (sMethodName1, ...) has changed.
Change-Id: Icad98f248ac15177337f1b4ab709a755a8af6238
2013-04-08 08:45:37 +02:00
|
|
|
rtl::Reference< unoidl::Manager > manager_;
|
|
|
|
std::vector< rtl::Reference< unoidl::Provider > > primaryProviders_;
|
2000-09-18 14:29:57 +00:00
|
|
|
};
|
|
|
|
|
2019-04-05 11:41:39 +01:00
|
|
|
|
|
|
|
inline OString u2b(OUString const & s) {
|
|
|
|
return OUStringToOString(s, RTL_TEXTENCODING_UTF8);
|
|
|
|
}
|
|
|
|
|
|
|
|
inline OUString b2u(OString const & s) {
|
|
|
|
return OStringToOUString(s, RTL_TEXTENCODING_UTF8);
|
|
|
|
}
|
|
|
|
|
2013-04-16 17:37:01 +02:00
|
|
|
#endif
|
2010-10-14 08:30:07 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|