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.
|
|
|
|
*
|
|
|
|
* 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/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2004-06-04 02:12:48 +00:00
|
|
|
|
2006-09-17 02:37:21 +00:00
|
|
|
|
2004-06-04 02:12:48 +00:00
|
|
|
#include "includes.hxx"
|
|
|
|
|
[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
|
|
|
#include "dependencies.hxx"
|
2004-06-04 02:12:48 +00:00
|
|
|
#include "dumputils.hxx"
|
|
|
|
|
|
|
|
#include "codemaker/global.hxx"
|
|
|
|
#include "codemaker/typemanager.hxx"
|
|
|
|
#include "codemaker/unotype.hxx"
|
|
|
|
|
|
|
|
#include "osl/diagnose.h"
|
2013-03-26 14:59:34 +01:00
|
|
|
#include "rtl/ref.hxx"
|
2004-06-04 02:12:48 +00:00
|
|
|
#include "rtl/string.hxx"
|
|
|
|
#include "rtl/ustring.hxx"
|
|
|
|
#include "sal/types.h"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
using codemaker::cppumaker::Includes;
|
|
|
|
|
|
|
|
Includes::Includes(
|
2013-03-26 14:59:34 +01:00
|
|
|
rtl::Reference< TypeManager > const & manager,
|
[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::cppumaker::Dependencies const & dependencies, bool hpp):
|
2004-06-04 02:12:48 +00:00
|
|
|
m_manager(manager), m_map(dependencies.getMap()), m_hpp(hpp),
|
2013-10-20 12:52:09 +02:00
|
|
|
m_includeCassert(false), m_includeException(false),
|
|
|
|
m_includeAny(dependencies.hasAnyDependency()), m_includeReference(false),
|
2004-06-04 02:12:48 +00:00
|
|
|
m_includeSequence(dependencies.hasSequenceDependency()),
|
|
|
|
m_includeType(dependencies.hasTypeDependency()),
|
2006-01-10 14:47:12 +00:00
|
|
|
m_includeCppuMacrosHxx(false), m_includeCppuUnotypeHxx(false),
|
|
|
|
m_includeOslDoublecheckedlockingH(false), m_includeOslMutexHxx(false),
|
|
|
|
m_includeRtlStrbufHxx(false), m_includeRtlStringH(false),
|
|
|
|
m_includeRtlTextencH(false), m_includeRtlUstrbufHxx(false),
|
|
|
|
m_includeRtlUstringH(false),
|
2004-06-04 02:12:48 +00:00
|
|
|
m_includeRtlUstringHxx(dependencies.hasStringDependency()),
|
2011-05-30 15:17:54 +01:00
|
|
|
m_includeRtlInstanceHxx(false),
|
2004-06-04 02:12:48 +00:00
|
|
|
m_includeSalTypesH(
|
|
|
|
dependencies.hasBooleanDependency() || dependencies.hasByteDependency()
|
|
|
|
|| dependencies.hasShortDependency()
|
|
|
|
|| dependencies.hasUnsignedShortDependency()
|
|
|
|
|| dependencies.hasLongDependency()
|
|
|
|
|| dependencies.hasUnsignedShortDependency()
|
|
|
|
|| dependencies.hasHyperDependency()
|
|
|
|
|| dependencies.hasUnsignedHyperDependency()
|
|
|
|
|| dependencies.hasCharDependency()),
|
|
|
|
m_includeTypelibTypeclassH(false),
|
|
|
|
m_includeTypelibTypedescriptionH(false)
|
|
|
|
{}
|
|
|
|
|
|
|
|
Includes::~Includes()
|
|
|
|
{}
|
|
|
|
|
[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
|
|
|
void Includes::add(OString const & entityName) {
|
|
|
|
sal_Int32 k;
|
2013-04-07 12:06:47 +02:00
|
|
|
std::vector< OString > args;
|
[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
|
|
|
OUString n(b2u(codemaker::UnoType::decompose(entityName, &k, &args)));
|
|
|
|
if (k != 0) {
|
2004-06-04 02:12:48 +00:00
|
|
|
m_includeSequence = true;
|
|
|
|
}
|
[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
|
|
|
switch (m_manager->getSort(n)) {
|
2004-06-04 02:12:48 +00:00
|
|
|
case codemaker::UnoType::SORT_BOOLEAN:
|
|
|
|
case codemaker::UnoType::SORT_BYTE:
|
|
|
|
case codemaker::UnoType::SORT_SHORT:
|
|
|
|
case codemaker::UnoType::SORT_UNSIGNED_SHORT:
|
|
|
|
case codemaker::UnoType::SORT_LONG:
|
|
|
|
case codemaker::UnoType::SORT_UNSIGNED_LONG:
|
|
|
|
case codemaker::UnoType::SORT_HYPER:
|
|
|
|
case codemaker::UnoType::SORT_UNSIGNED_HYPER:
|
|
|
|
case codemaker::UnoType::SORT_CHAR:
|
|
|
|
m_includeSalTypesH = true;
|
|
|
|
break;
|
|
|
|
case codemaker::UnoType::SORT_FLOAT:
|
|
|
|
case codemaker::UnoType::SORT_DOUBLE:
|
|
|
|
break;
|
|
|
|
case codemaker::UnoType::SORT_STRING:
|
|
|
|
m_includeRtlUstringHxx = true;
|
|
|
|
break;
|
|
|
|
case codemaker::UnoType::SORT_TYPE:
|
|
|
|
m_includeType = true;
|
|
|
|
break;
|
|
|
|
case codemaker::UnoType::SORT_ANY:
|
|
|
|
m_includeAny = true;
|
|
|
|
break;
|
[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
|
|
|
case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
|
|
|
|
for (std::vector< OString >::iterator i(args.begin()); i != args.end();
|
|
|
|
++i)
|
2004-06-04 02:12:48 +00:00
|
|
|
{
|
|
|
|
add(*i);
|
2013-01-26 16:31:43 +01: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
|
|
|
// fall through
|
|
|
|
case codemaker::UnoType::SORT_SEQUENCE_TYPE:
|
|
|
|
case codemaker::UnoType::SORT_ENUM_TYPE:
|
|
|
|
case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
|
|
|
|
case codemaker::UnoType::SORT_EXCEPTION_TYPE:
|
|
|
|
case codemaker::UnoType::SORT_INTERFACE_TYPE:
|
|
|
|
case codemaker::UnoType::SORT_TYPEDEF:
|
|
|
|
m_map.insert(
|
|
|
|
Dependencies::Map::value_type(n, Dependencies::KIND_NO_BASE));
|
2004-06-04 02:12:48 +00:00
|
|
|
break;
|
|
|
|
default:
|
[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
|
|
|
throw CannotDumpException(
|
|
|
|
"unexpected type \"" + b2u(entityName)
|
|
|
|
+ "\" in call to codemaker::cppumaker::Includes::add");
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
void dumpEmptyLineBeforeFirst(FileStream & out, bool * first) {
|
|
|
|
OSL_ASSERT(first != 0);
|
|
|
|
if (*first) {
|
|
|
|
out << "\n";
|
|
|
|
*first = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
[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
|
|
|
void Includes::dump(FileStream & out, OUString const * companionHdl) {
|
2004-06-04 02:12:48 +00:00
|
|
|
OSL_ASSERT(companionHdl == 0 || m_hpp);
|
|
|
|
if (!m_includeReference) {
|
[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
|
|
|
for (Dependencies::Map::iterator i(m_map.begin()); i != m_map.end();
|
|
|
|
++i)
|
2004-06-04 02:12:48 +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
|
|
|
if (isInterfaceType(u2b(i->first))) {
|
2004-06-04 02:12:48 +00:00
|
|
|
m_includeReference = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-04-11 11:09:37 +00:00
|
|
|
out << "#include \"sal/config.h\"\n";
|
2013-10-20 12:52:09 +02:00
|
|
|
if (m_includeCassert || m_includeException) {
|
|
|
|
out << "\n";
|
|
|
|
if (m_includeCassert) {
|
|
|
|
out << "#include <cassert>\n";
|
|
|
|
}
|
|
|
|
if (m_includeException) {
|
|
|
|
out << "#include <exception>\n";
|
|
|
|
}
|
2012-09-17 16:56:19 +02:00
|
|
|
}
|
2004-06-04 02:12:48 +00:00
|
|
|
if (companionHdl) {
|
|
|
|
out << "\n";
|
[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
|
|
|
dumpInclude(out, u2b(*companionHdl), false);
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
bool first = true;
|
[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
|
|
|
for (Dependencies::Map::iterator i(m_map.begin()); i != m_map.end(); ++i)
|
2004-06-04 02:12:48 +00:00
|
|
|
{
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
[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
|
|
|
if (m_hpp || i->second == Dependencies::KIND_BASE
|
|
|
|
|| !isInterfaceType(u2b(i->first)))
|
2004-06-04 02:12:48 +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
|
|
|
dumpInclude(out, u2b(i->first), m_hpp);
|
2004-06-04 02:12:48 +00:00
|
|
|
} else {
|
2006-06-20 01:24:44 +00:00
|
|
|
bool ns = dumpNamespaceOpen(out, i->first, false);
|
2004-06-04 02:12:48 +00:00
|
|
|
if (ns) {
|
|
|
|
out << " ";
|
|
|
|
}
|
|
|
|
out << "class ";
|
2006-06-20 01:24:44 +00:00
|
|
|
dumpTypeIdentifier(out, i->first);
|
2004-06-04 02:12:48 +00:00
|
|
|
out << ";";
|
|
|
|
if (ns) {
|
|
|
|
out << " ";
|
|
|
|
}
|
|
|
|
dumpNamespaceClose(out, i->first, false);
|
|
|
|
out << "\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
static char const * hxxExtension[2] = { "h", "hxx" };
|
|
|
|
if (m_includeAny) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
[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
|
|
|
out << "#include \"com/sun/star/uno/Any." << hxxExtension[m_hpp]
|
|
|
|
<< "\"\n";
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeReference) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
[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
|
|
|
out << "#include \"com/sun/star/uno/Reference." << hxxExtension[m_hpp]
|
|
|
|
<< "\"\n";
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeSequence) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
[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
|
|
|
out << "#include \"com/sun/star/uno/Sequence." << hxxExtension[m_hpp]
|
|
|
|
<< "\"\n";
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeType) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
[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
|
|
|
out << "#include \"com/sun/star/uno/Type." << hxxExtension[m_hpp]
|
|
|
|
<< "\"\n";
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeCppuMacrosHxx) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << ("#include \"cppu/macros.hxx\"\n");
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
2006-01-10 14:47:12 +00:00
|
|
|
if (m_includeCppuUnotypeHxx) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << ("#include \"cppu/unotype.hxx\"\n");
|
2006-01-10 14:47:12 +00:00
|
|
|
}
|
2004-06-04 02:12:48 +00:00
|
|
|
if (m_includeOslDoublecheckedlockingH) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << ("#include \"osl/doublecheckedlocking.h\"\n");
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeOslMutexHxx) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << "#include \"osl/mutex.hxx\"\n";
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeRtlStrbufHxx) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << ("#include \"rtl/strbuf.hxx\"\n");
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeRtlStringH) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << "#include \"rtl/string.h\"\n";
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeRtlTextencH) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << "#include \"rtl/textenc.h\"\n";
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeRtlUstrbufHxx) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << ("#include \"rtl/ustrbuf.hxx\"\n");
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeRtlUstringH) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << "#include \"rtl/ustring.h\"\n";
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeRtlUstringHxx) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << ("#include \"rtl/ustring.hxx\"\n");
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
2011-05-30 15:17:54 +01:00
|
|
|
if (m_includeRtlInstanceHxx) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
|
|
|
out << "#include \"rtl/instance.hxx\"\n";
|
|
|
|
}
|
2004-06-04 02:12:48 +00:00
|
|
|
if (m_includeSalTypesH) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << "#include \"sal/types.h\"\n";
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeTypelibTypeclassH) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << ("#include \"typelib/typeclass.h\"\n");
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
if (m_includeTypelibTypedescriptionH) {
|
|
|
|
dumpEmptyLineBeforeFirst(out, &first);
|
2008-04-11 11:09:37 +00:00
|
|
|
out << ("#include \"typelib/typedescription.h\"\n");
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Includes::dumpInclude(
|
[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
|
|
|
FileStream & out, OString const & entityName, bool hpp)
|
2004-06-04 02:12:48 +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
|
|
|
out << "#include \"" << entityName.replace('.', '/') << "."
|
|
|
|
<< (hpp ? "hpp" : "hdl") << "\"\n";
|
2004-06-04 02:12:48 +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
|
|
|
bool Includes::isInterfaceType(OString const & entityName) const {
|
|
|
|
return m_manager->getSort(b2u(entityName)) == UnoType::SORT_INTERFACE_TYPE;
|
2004-06-04 02:12:48 +00:00
|
|
|
}
|
2010-10-14 08:30:07 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|