diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-03-09 11:34:22 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-03-09 12:08:28 +0100 |
commit | 892ef8b0565c7f5f343d71e3b61c41655f80267b (patch) | |
tree | f900613a4e797d3a55f05a39c200d97cddbcfc30 /unoidl | |
parent | 4e38ea86701bdefcf31c6f9e3136d1eda4e5c061 (diff) |
WIP: Experimental new binary type.rdb format
Implement theTypeDescriptionManager directly on top of unoidl::Manager and
unoidl::Provider in cppuhelper instead of on top of css.reflection UNO
interfaces in stoc. Adapt desktop/source/deployment/ accordingly.
There is no longer a com.sun.star.reflection.TypeDescriptionManager service
implementation now, only a com.sun.star.reflection.theTypeDescriptionManager
singleton one, which appears to not cause problems in practice.
Change-Id: I179501272f0712353b7d50d3eba2ec2bb79db373
Diffstat (limited to 'unoidl')
-rw-r--r-- | unoidl/inc/unoidl/unoidl.hxx | 2 | ||||
-rw-r--r-- | unoidl/source/unoidl.cxx | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/unoidl/inc/unoidl/unoidl.hxx b/unoidl/inc/unoidl/unoidl.hxx index 5597227c16e0..203df47be94c 100644 --- a/unoidl/inc/unoidl/unoidl.hxx +++ b/unoidl/inc/unoidl/unoidl.hxx @@ -15,6 +15,7 @@ #include <cassert> #include <vector> +#include "osl/mutex.hxx" #include "rtl/ref.hxx" #include "rtl/ustring.hxx" #include "sal/types.h" @@ -623,6 +624,7 @@ public: private: virtual SAL_DLLPRIVATE ~Manager() throw (); + mutable osl::Mutex mutex_; std::vector< rtl::Reference< Provider > > providers_; }; diff --git a/unoidl/source/unoidl.cxx b/unoidl/source/unoidl.cxx index 0ffeb6bdd014..07aabcd70c46 100644 --- a/unoidl/source/unoidl.cxx +++ b/unoidl/source/unoidl.cxx @@ -11,6 +11,7 @@ #include <vector> +#include "osl/mutex.hxx" #include "rtl/ref.hxx" #include "rtl/ustring.hxx" #include "unoidl/legacyprovider.hxx" @@ -74,11 +75,13 @@ rtl::Reference< Provider > loadProvider( void Manager::addProvider(rtl::Reference< Provider > const & provider) { assert(provider.is()); + osl::MutexGuard g(mutex_); providers_.push_back(provider); } rtl::Reference< Entity > Manager::findEntity(rtl::OUString const & name) const { - //TODO: add caching + //TODO: caching? (here or in cppuhelper::TypeManager?) + osl::MutexGuard g(mutex_); for (std::vector< rtl::Reference< Provider > >::const_iterator i( providers_.begin()); i != providers_.end(); ++i) |