Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
0d44e98d
Kaydet (Commit)
0d44e98d
authored
Ock 07, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Variadic cppu::WeakImplHelper
Change-Id: Ia02a7c94ca282f28fa3c191dd65a71b6bf031792
üst
306f0483
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
118 additions
and
2 deletions
+118
-2
factory.cxx
cppuhelper/source/factory.cxx
+2
-2
implbase.hxx
include/cppuhelper/implbase.hxx
+116
-0
No files found.
cppuhelper/source/factory.cxx
Dosyayı görüntüle @
0d44e98d
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/component.hxx>
#include <cppuhelper/component.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase
3
.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/typeprovider.hxx>
...
@@ -873,7 +873,7 @@ sal_Bool SAL_CALL ORegistryFactoryHelper::releaseOnNotification() throw(::com::s
...
@@ -873,7 +873,7 @@ sal_Bool SAL_CALL ORegistryFactoryHelper::releaseOnNotification() throw(::com::s
return
retVal
;
return
retVal
;
}
}
class
OFactoryProxyHelper
:
public
WeakImplHelper
3
<
XServiceInfo
,
XSingleServiceFactory
,
class
OFactoryProxyHelper
:
public
WeakImplHelper
<
XServiceInfo
,
XSingleServiceFactory
,
XUnloadingPreference
>
XUnloadingPreference
>
{
{
Reference
<
XSingleServiceFactory
>
xFactory
;
Reference
<
XSingleServiceFactory
>
xFactory
;
...
...
include/cppuhelper/implbase.hxx
0 → 100644
Dosyayı görüntüle @
0d44e98d
/* -*- 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/.
*
* 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 .
*/
#ifndef INCLUDED_CPPUHELPER_IMPLBASE_HXX
#define INCLUDED_CPPUHELPER_IMPLBASE_HXX
#include <sal/config.h>
#include <cstddef>
#include <exception>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Type.hxx>
#include <cppuhelper/implbase_ex.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/instance.hxx>
#include <sal/types.h>
#if defined LIBO_INTERNAL_ONLY
namespace
cppu
{
/// @cond INTERNAL
namespace
detail
{
template
<
std
::
size_t
N
>
struct
class_dataN
{
sal_Int16
m_nTypes
;
sal_Bool
m_storedTypeRefs
;
sal_Bool
m_storedId
;
sal_Int8
m_id
[
16
];
type_entry
m_typeEntries
[
N
+
1
];
};
template
<
typename
Impl
,
typename
...
Ifc
>
struct
ImplClassData
{
class_data
*
operator
()()
{
static
class_dataN
<
sizeof
...
(
Ifc
)
>
s_cd
=
{
sizeof
...
(
Ifc
)
+
1
,
false
,
false
,
{},
{
{
{
Ifc
::
static_type
},
(
reinterpret_cast
<
sal_IntPtr
>
(
static_cast
<
Ifc
*>
(
reinterpret_cast
<
Impl
*>
(
16
)))
-
16
)
}...,
CPPUHELPER_DETAIL_TYPEENTRY
(
css
::
lang
::
XTypeProvider
)
}
};
return
reinterpret_cast
<
class_data
*>
(
&
s_cd
);
}
};
}
/// @endcond
/** Implementation helper implementing interfaces
com::sun::star::uno::XInterface, com::sun::star::lang::XTypeProvider, and
com::sun::star::uno::XWeak (through cppu::OWeakObject).
@derive
Inherit from this class giving your interface(s) to be implemented as
template argument(s).
*/
template
<
typename
...
Ifc
>
class
SAL_NO_VTABLE
SAL_DLLPUBLIC_TEMPLATE
WeakImplHelper
:
public
OWeakObject
,
public
css
::
lang
::
XTypeProvider
,
public
Ifc
...
{
struct
cd
:
rtl
::
StaticAggregate
<
class_data
,
detail
::
ImplClassData
<
WeakImplHelper
,
Ifc
...
>>
{};
public
:
css
::
uno
::
Any
SAL_CALL
queryInterface
(
css
::
uno
::
Type
const
&
aType
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
{
return
WeakImplHelper_query
(
aType
,
cd
::
get
(),
this
,
this
);
}
void
SAL_CALL
acquire
()
throw
()
SAL_OVERRIDE
{
OWeakObject
::
acquire
();
}
void
SAL_CALL
release
()
throw
()
SAL_OVERRIDE
{
OWeakObject
::
release
();
}
css
::
uno
::
Sequence
<
css
::
uno
::
Type
>
SAL_CALL
getTypes
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
{
return
WeakImplHelper_getTypes
(
cd
::
get
());
}
css
::
uno
::
Sequence
<
sal_Int8
>
SAL_CALL
getImplementationId
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
{
return
css
::
uno
::
Sequence
<
sal_Int8
>
();
}
};
}
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment