LibreOffice Module comphelper (master) 1
multicontainer2.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <sal/config.h>
23
24#include <osl/mutex.hxx>
25#include <com/sun/star/lang/EventObject.hpp>
28#include <memory>
29#include <vector>
30#include <utility>
31
32namespace com::sun::star::uno
33{
34class XInterface;
35}
36
37namespace comphelper
38{
43{
44public:
57
61 std::vector<css::uno::Type> getContainedTypes() const;
62
68 OInterfaceContainerHelper2* getContainer(const css::uno::Type& rKey) const;
69
88 sal_Int32 addInterface(const css::uno::Type& rKey,
89 const css::uno::Reference<css::uno::XInterface>& r);
90
101 sal_Int32 removeInterface(const css::uno::Type& rKey,
102 const css::uno::Reference<css::uno::XInterface>& rxIFace);
103
108 void disposeAndClear(const css::lang::EventObject& rEvt);
112 void clear();
113
114 typedef css::uno::Type keyType;
115
116private:
117 typedef std::vector<std::pair<css::uno::Type, std::unique_ptr<OInterfaceContainerHelper2>>>
119
120 t_type2ptr::iterator findType(const css::uno::Type& rKey);
121 t_type2ptr::const_iterator findType(const css::uno::Type& rKey) const;
122
124 ::osl::Mutex& rMutex;
125
128 = delete;
129};
130
131} // namespace comphelper
132
133/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This is a copy of cppu::OMultiTypeInterfaceContainerHelper2 in include/cppuhelper/interfacecontainer....
OMultiTypeInterfaceContainerHelper2 & operator=(const OMultiTypeInterfaceContainerHelper2 &)=delete
OMultiTypeInterfaceContainerHelper2(::osl::Mutex &rMutex)
Create a container of interface containers.
t_type2ptr::iterator findType(const css::uno::Type &rKey)
t_type2ptr::const_iterator findType(const css::uno::Type &rKey) const
std::vector< std::pair< css::uno::Type, std::unique_ptr< OInterfaceContainerHelper2 > > > t_type2ptr
OMultiTypeInterfaceContainerHelper2(const OMultiTypeInterfaceContainerHelper2 &)=delete
#define COMPHELPER_DLLPUBLIC