2013-02-22 17:20:18 +01: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/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "sal/config.h"
|
|
|
|
|
[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 <set>
|
2013-02-22 17:20:18 +01:00
|
|
|
#include <vector>
|
|
|
|
|
2013-09-13 15:25:45 +02:00
|
|
|
#include "osl/file.h"
|
|
|
|
#include "osl/file.hxx"
|
2013-04-17 16:43:13 +02:00
|
|
|
#include "osl/mutex.hxx"
|
2013-02-22 17:20:18 +01:00
|
|
|
#include "rtl/ref.hxx"
|
|
|
|
#include "rtl/ustring.hxx"
|
2013-02-25 15:31:05 +01:00
|
|
|
#include "unoidl/unoidl.hxx"
|
2013-09-16 17:36:42 +02:00
|
|
|
|
|
|
|
#include "legacyprovider.hxx"
|
2013-09-16 23:25:43 +02:00
|
|
|
#include "sourcefileprovider.hxx"
|
2013-09-16 22:30:31 +02:00
|
|
|
#include "sourcetreeprovider.hxx"
|
2013-09-16 17:36:42 +02:00
|
|
|
#include "unoidlprovider.hxx"
|
2013-02-22 17:20:18 +01:00
|
|
|
|
2013-02-25 15:31:05 +01:00
|
|
|
namespace unoidl {
|
2013-02-22 17:20:18 +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
|
|
|
namespace {
|
|
|
|
|
2013-10-24 09:48:13 +02:00
|
|
|
class AggregatingModule: public ModuleEntity {
|
|
|
|
public:
|
|
|
|
AggregatingModule(
|
|
|
|
std::vector< rtl::Reference< Provider > > const & providers,
|
|
|
|
OUString const & name):
|
|
|
|
providers_(providers), name_(name)
|
|
|
|
{}
|
|
|
|
|
|
|
|
private:
|
|
|
|
virtual ~AggregatingModule() throw () {}
|
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual std::vector< OUString > getMemberNames() const SAL_OVERRIDE;
|
2013-10-24 09:48:13 +02:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual rtl::Reference< MapCursor > createCursor() const SAL_OVERRIDE;
|
2013-10-24 09:48:13 +02:00
|
|
|
|
|
|
|
std::vector< rtl::Reference< Provider > > providers_;
|
|
|
|
OUString name_;
|
|
|
|
};
|
|
|
|
|
|
|
|
std::vector< OUString > AggregatingModule::getMemberNames() const {
|
|
|
|
std::set< OUString > names;
|
|
|
|
for (std::vector< rtl::Reference< Provider > >::const_iterator i(
|
|
|
|
providers_.begin());
|
|
|
|
i != providers_.end(); ++i)
|
|
|
|
{
|
|
|
|
rtl::Reference< Entity > ent((*i)->findEntity(name_));
|
|
|
|
if (ent.is() && ent->getSort() == Entity::SORT_MODULE) {
|
|
|
|
std::vector< OUString > ns(
|
|
|
|
static_cast< ModuleEntity * >(ent.get())->getMemberNames());
|
|
|
|
names.insert(ns.begin(), ns.end());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return std::vector< OUString >(names.begin(), names.end());
|
|
|
|
}
|
|
|
|
|
[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
|
|
|
class AggregatingCursor: public MapCursor {
|
|
|
|
public:
|
|
|
|
AggregatingCursor(
|
2013-10-24 09:48:13 +02:00
|
|
|
std::vector< rtl::Reference< Provider > > const & providers,
|
|
|
|
OUString const & name):
|
|
|
|
providers_(providers), name_(name), iterator_(providers_.begin())
|
|
|
|
{ findCursor(); }
|
[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
|
|
|
|
|
|
|
private:
|
|
|
|
virtual ~AggregatingCursor() throw () {}
|
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual rtl::Reference< Entity > getNext(OUString * name) SAL_OVERRIDE;
|
[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-10-24 09:48:13 +02:00
|
|
|
void findCursor();
|
|
|
|
|
|
|
|
std::vector< rtl::Reference< Provider > > providers_;
|
|
|
|
OUString name_;
|
|
|
|
std::vector< rtl::Reference< Provider > >::iterator iterator_;
|
|
|
|
rtl::Reference< MapCursor > cursor_;
|
|
|
|
std::set< OUString > seen_;
|
[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-10-24 09:48:13 +02:00
|
|
|
rtl::Reference< Entity > AggregatingCursor::getNext(OUString * name) {
|
|
|
|
while (cursor_.is()) {
|
|
|
|
OUString n;
|
|
|
|
rtl::Reference< Entity > ent(cursor_->getNext(&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
|
|
|
if (ent.is()) {
|
2013-10-24 09:48:13 +02:00
|
|
|
if (seen_.insert(n).second) {
|
[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 (name != 0) {
|
|
|
|
*name = n;
|
|
|
|
}
|
2013-10-24 09:48:13 +02:00
|
|
|
return ent->getSort() == Entity::SORT_MODULE
|
|
|
|
? new AggregatingModule(
|
|
|
|
providers_, (name_.isEmpty() ? name_ : name_ + ".") + n)
|
|
|
|
: ent;
|
[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
|
|
|
}
|
|
|
|
} else {
|
2013-10-24 09:48:13 +02:00
|
|
|
cursor_.clear();
|
|
|
|
findCursor();
|
[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-10-24 09:48:13 +02:00
|
|
|
return rtl::Reference< Entity >();
|
|
|
|
}
|
|
|
|
|
|
|
|
void AggregatingCursor::findCursor() {
|
|
|
|
for (; !cursor_.is() && iterator_ != providers_.end(); ++iterator_) {
|
|
|
|
if (name_.isEmpty()) {
|
|
|
|
cursor_ = (*iterator_)->createRootCursor();
|
|
|
|
} else {
|
|
|
|
rtl::Reference< Entity > ent((*iterator_)->findEntity(name_));
|
|
|
|
if (ent.is() && ent->getSort() == Entity::SORT_MODULE) {
|
|
|
|
cursor_ = static_cast< ModuleEntity * >(ent.get())->
|
|
|
|
createCursor();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rtl::Reference< MapCursor > AggregatingModule::createCursor() const {
|
|
|
|
return new AggregatingCursor(providers_, name_);
|
[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-02-25 15:31:05 +01:00
|
|
|
NoSuchFileException::~NoSuchFileException() throw () {}
|
|
|
|
|
|
|
|
FileFormatException::~FileFormatException() throw () {}
|
2013-02-22 17:20:18 +01:00
|
|
|
|
|
|
|
Entity::~Entity() throw () {}
|
|
|
|
|
|
|
|
MapCursor::~MapCursor() throw () {}
|
|
|
|
|
|
|
|
ModuleEntity::~ModuleEntity() throw () {}
|
|
|
|
|
|
|
|
PublishableEntity::~PublishableEntity() throw () {}
|
|
|
|
|
|
|
|
EnumTypeEntity::~EnumTypeEntity() throw () {}
|
|
|
|
|
|
|
|
PlainStructTypeEntity::~PlainStructTypeEntity() throw () {}
|
|
|
|
|
|
|
|
PolymorphicStructTypeTemplateEntity::~PolymorphicStructTypeTemplateEntity()
|
|
|
|
throw ()
|
|
|
|
{}
|
|
|
|
|
|
|
|
ExceptionTypeEntity::~ExceptionTypeEntity() throw () {}
|
|
|
|
|
|
|
|
InterfaceTypeEntity::~InterfaceTypeEntity() throw () {}
|
|
|
|
|
|
|
|
TypedefEntity::~TypedefEntity() throw () {}
|
|
|
|
|
|
|
|
ConstantGroupEntity::~ConstantGroupEntity() throw () {}
|
|
|
|
|
|
|
|
SingleInterfaceBasedServiceEntity::~SingleInterfaceBasedServiceEntity() throw ()
|
|
|
|
{}
|
|
|
|
|
|
|
|
AccumulationBasedServiceEntity::~AccumulationBasedServiceEntity() throw () {}
|
|
|
|
|
|
|
|
InterfaceBasedSingletonEntity::~InterfaceBasedSingletonEntity() throw () {}
|
|
|
|
|
|
|
|
ServiceBasedSingletonEntity::~ServiceBasedSingletonEntity() throw () {}
|
|
|
|
|
|
|
|
Provider::~Provider() throw () {}
|
|
|
|
|
2014-05-23 12:30:00 +02:00
|
|
|
rtl::Reference< Provider > Manager::addProvider(OUString const & uri) {
|
|
|
|
rtl::Reference< Provider > p(loadProvider(uri));
|
|
|
|
assert(p.is());
|
|
|
|
{
|
|
|
|
osl::MutexGuard g(mutex_);
|
|
|
|
providers_.push_back(p);
|
2013-03-01 23:23:50 +01:00
|
|
|
}
|
2014-05-23 12:30:00 +02:00
|
|
|
return p;
|
2013-03-01 23:23:50 +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
|
|
|
rtl::Reference< Entity > Manager::findEntity(rtl::OUString const & name) const {
|
2013-04-17 16:43:13 +02:00
|
|
|
//TODO: caching? (here or in cppuhelper::TypeManager?)
|
|
|
|
osl::MutexGuard g(mutex_);
|
2013-03-01 23:23:50 +01:00
|
|
|
for (std::vector< rtl::Reference< Provider > >::const_iterator i(
|
|
|
|
providers_.begin());
|
|
|
|
i != providers_.end(); ++i)
|
|
|
|
{
|
|
|
|
rtl::Reference< Entity > ent((*i)->findEntity(name));
|
|
|
|
if (ent.is()) {
|
|
|
|
return ent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return rtl::Reference< Entity >();
|
|
|
|
}
|
|
|
|
|
[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< MapCursor > Manager::createCursor(rtl::OUString const & name)
|
|
|
|
const
|
|
|
|
{
|
2013-10-24 09:48:13 +02:00
|
|
|
return new AggregatingCursor(providers_, name);
|
[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-03-01 23:23:50 +01:00
|
|
|
Manager::~Manager() throw () {}
|
|
|
|
|
2014-05-23 12:30:00 +02:00
|
|
|
rtl::Reference< Provider > Manager::loadProvider(OUString const & uri) {
|
|
|
|
osl::DirectoryItem item;
|
|
|
|
if (osl::DirectoryItem::get(uri, item) == osl::FileBase::E_None) {
|
|
|
|
osl::FileStatus status(osl_FileStatus_Mask_Type);
|
|
|
|
if (item.getFileStatus(status) == osl::FileBase::E_None
|
|
|
|
&& status.getFileType() == osl::FileStatus::Directory)
|
|
|
|
{
|
|
|
|
return new detail::SourceTreeProvider(this, uri);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (uri.endsWith(".idl")) {
|
|
|
|
return new detail::SourceFileProvider(this, uri);
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
return new detail::UnoidlProvider(uri);
|
|
|
|
} catch (FileFormatException & e) {
|
|
|
|
SAL_INFO(
|
|
|
|
"unoidl",
|
|
|
|
"FileFormatException \"" << e.getDetail() << "\", retrying <" << uri
|
|
|
|
<< "> as legacy format");
|
|
|
|
return new detail::LegacyProvider(this, uri);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-25 15:31:05 +01:00
|
|
|
}
|
2013-02-22 17:20:18 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|