summaryrefslogtreecommitdiffstats
path: root/cppuhelper/source/typemanager.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-17 16:43:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-22 18:25:42 +0200
commit5275ed805a6e42f56c59d1c5876a7994625905a9 (patch)
tree0a802c2ce8bbf54c047ada5c303a403b51ba8136 /cppuhelper/source/typemanager.hxx
parentclean up PythonTests (diff)
downloadcore-5275ed805a6e42f56c59d1c5876a7994625905a9.tar.gz
core-5275ed805a6e42f56c59d1c5876a7994625905a9.zip
Revert "Revert "WIP: Experimental new binary type.rdb format""
This reverts commit 67e69a55820f50973ca0de75ccab2bb07d0bada8, applying a band- aid fix to cli_ure/source/climaker for now. Conflicts: stoc/inc/bootstrapservices.hxx stoc/source/tdmanager/lrucache.hxx stoc/source/tdmanager/tdmgr.cxx stoc/source/tdmanager/tdmgr_common.hxx stoc/source/tdmanager/tdmgr_tdenumeration.cxx stoc/source/tdmanager/tdmgr_tdenumeration.hxx Change-Id: Iae669985d0194f06fa349a4a39f0ebd230bc5d28
Diffstat (limited to 'cppuhelper/source/typemanager.hxx')
-rw-r--r--cppuhelper/source/typemanager.hxx151
1 files changed, 151 insertions, 0 deletions
diff --git a/cppuhelper/source/typemanager.hxx b/cppuhelper/source/typemanager.hxx
new file mode 100644
index 000000000000..a84a2319f3a0
--- /dev/null
+++ b/cppuhelper/source/typemanager.hxx
@@ -0,0 +1,151 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_CPPUHELPER_SOURCE_TYPEMANAGER_HXX
+#define INCLUDED_CPPUHELPER_SOURCE_TYPEMANAGER_HXX
+
+#include "sal/config.h"
+
+#include "com/sun/star/container/ElementExistException.hpp"
+#include "com/sun/star/container/NoSuchElementException.hpp"
+#include "com/sun/star/container/XHierarchicalNameAccess.hpp"
+#include "com/sun/star/container/XSet.hpp"
+#include "com/sun/star/lang/IllegalArgumentException.hpp"
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/reflection/InvalidTypeNameException.hpp"
+#include "com/sun/star/reflection/NoSuchTypeNameException.hpp"
+#include "com/sun/star/reflection/TypeDescriptionSearchDepth.hpp"
+#include "com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "cppuhelper/compbase4.hxx"
+#include "osl/mutex.hxx"
+#include "rtl/ref.hxx"
+#include "sal/types.h"
+
+namespace com { namespace sun { namespace star {
+ namespace uno { class Any; }
+ namespace reflection { class XTypeDescription; }
+} } }
+namespace rtl { class OUString; }
+namespace unoidl {
+ class ConstantGroupEntity;
+ class Entity;
+ class EnumTypeEntity;
+ class Manager;
+}
+
+namespace cppuhelper {
+
+typedef cppu::WeakComponentImplHelper4<
+ css::lang::XServiceInfo, css::container::XHierarchicalNameAccess,
+ css::container::XSet, css::reflection::XTypeDescriptionEnumerationAccess >
+TypeManager_Base;
+
+class TypeManager: private osl::Mutex, public TypeManager_Base {
+public:
+ explicit TypeManager(rtl::OUString const & rdbUris);
+
+ using TypeManager_Base::acquire;
+ using TypeManager_Base::release;
+
+ css::uno::Any find(rtl::OUString const & name);
+
+ css::uno::Reference< css::reflection::XTypeDescription > resolve(
+ rtl::OUString const & name);
+
+private:
+ virtual ~TypeManager() throw ();
+
+ virtual void SAL_CALL disposing();
+
+ virtual rtl::OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName)
+ throw (css::uno::RuntimeException);
+
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL
+ getSupportedServiceNames() throw (css::uno::RuntimeException);
+
+ virtual css::uno::Any SAL_CALL getByHierarchicalName(
+ rtl::OUString const & aName)
+ throw (
+ css::container::NoSuchElementException, css::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL hasByHierarchicalName(rtl::OUString const & aName)
+ throw (css::uno::RuntimeException);
+
+ virtual css::uno::Type SAL_CALL getElementType()
+ throw (css::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException);
+
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
+ createEnumeration() throw (css::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL has(css::uno::Any const & aElement)
+ throw (css::uno::RuntimeException);
+
+ virtual void SAL_CALL insert(css::uno::Any const & aElement)
+ throw (
+ css::lang::IllegalArgumentException,
+ css::container::ElementExistException, css::uno::RuntimeException);
+
+ virtual void SAL_CALL remove(css::uno::Any const & aElement)
+ throw (
+ css::lang::IllegalArgumentException,
+ css::container::NoSuchElementException, css::uno::RuntimeException);
+
+ virtual css::uno::Reference< css::reflection::XTypeDescriptionEnumeration >
+ SAL_CALL createTypeDescriptionEnumeration(
+ rtl::OUString const & moduleName,
+ css::uno::Sequence< css::uno::TypeClass > const & types,
+ css::reflection::TypeDescriptionSearchDepth depth)
+ throw (
+ css::reflection::NoSuchTypeNameException,
+ css::reflection::InvalidTypeNameException,
+ css::uno::RuntimeException);
+
+ void readRdbs(rtl::OUString const & uris);
+
+ void readRdbDirectory(rtl::OUString const & uri, bool optional);
+
+ void readRdbFile(rtl::OUString const & uri, bool optional);
+
+ css::uno::Any getSequenceType(rtl::OUString const & name);
+
+ css::uno::Any getInstantiatedStruct(
+ rtl::OUString const & name, sal_Int32 separator);
+
+ css::uno::Any getInterfaceMember(
+ rtl::OUString const & name, sal_Int32 separator);
+
+ css::uno::Any getNamed(
+ rtl::OUString const & name, rtl::Reference< unoidl::Entity > entity);
+
+ css::uno::Any getEnumMember(
+ rtl::Reference< unoidl::EnumTypeEntity > entity,
+ rtl::OUString const & member);
+
+ css::uno::Any getConstant(
+ rtl::Reference< unoidl::ConstantGroupEntity > entity,
+ rtl::OUString const & member);
+
+ rtl::Reference< unoidl::Entity > findEntity(rtl::OUString const & name);
+
+ rtl::Reference< unoidl::Manager > manager_;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */