My Project
UDK 3.2.7 C/C++ API Reference
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
cppuhelper
compbase.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*************************************************************************
3
*
4
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
*
6
* Copyright 2000, 2010 Oracle and/or its affiliates.
7
*
8
* OpenOffice.org - a multi-platform office productivity suite
9
*
10
* This file is part of OpenOffice.org.
11
*
12
* OpenOffice.org is free software: you can redistribute it and/or modify
13
* it under the terms of the GNU Lesser General Public License version 3
14
* only, as published by the Free Software Foundation.
15
*
16
* OpenOffice.org is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Lesser General Public License version 3 for more details
20
* (a copy is included in the LICENSE file that accompanied this code).
21
*
22
* You should have received a copy of the GNU Lesser General Public License
23
* version 3 along with OpenOffice.org. If not, see
24
* <http://www.openoffice.org/license.html>
25
* for a copy of the LGPLv3 License.
26
*
27
************************************************************************/
28
#ifndef _CPPUHELPER_COMPBASE_HXX_
29
#define _CPPUHELPER_COMPBASE_HXX_
30
31
#include <
cppuhelper/compbase_ex.hxx
>
32
#include <
cppuhelper/implbase.hxx
>
33
34
/* This header should not be used anymore.
35
@deprecated
36
*/
37
39
40
#define __DEF_COMPIMPLHELPER_A( N ) \
41
namespace cppu \
42
{ \
43
template< __CLASS_IFC##N > \
44
class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakComponentImplHelper##N \
45
: public ::cppu::WeakComponentImplHelperBase \
46
, public ImplHelperBase##N< __IFC##N > \
47
{ \
48
static ClassData##N s_aCD; \
49
public: \
50
WeakComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW(()) \
51
: WeakComponentImplHelperBase( rMutex ) \
52
{} \
53
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \
54
{ \
55
::com::sun::star::uno::Any aRet( getClassData( s_aCD ).query( rType, (ImplHelperBase##N< __IFC##N > *)this ) ); \
56
if (aRet.hasValue()) \
57
return aRet; \
58
return WeakComponentImplHelperBase::queryInterface( rType ); \
59
} \
60
virtual void SAL_CALL acquire() throw () \
61
{ WeakComponentImplHelperBase::acquire(); } \
62
virtual void SAL_CALL release() throw () \
63
{ WeakComponentImplHelperBase::release(); } \
64
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \
65
{ return getClassData( s_aCD ).getTypes(); } \
66
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \
67
{ return getClassData( s_aCD ).getImplementationId(); } \
68
}; \
69
template< __CLASS_IFC##N > \
70
class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggComponentImplHelper##N \
71
: public ::cppu::WeakAggComponentImplHelperBase \
72
, public ImplHelperBase##N< __IFC##N > \
73
{ \
74
static ClassData##N s_aCD; \
75
public: \
76
WeakAggComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW(()) \
77
: WeakAggComponentImplHelperBase( rMutex ) \
78
{} \
79
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \
80
{ return WeakAggComponentImplHelperBase::queryInterface( rType ); } \
81
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \
82
{ \
83
::com::sun::star::uno::Any aRet( getClassData( s_aCD ).query( rType, (ImplHelperBase##N< __IFC##N > *)this ) ); \
84
if (aRet.hasValue()) \
85
return aRet; \
86
return WeakAggComponentImplHelperBase::queryAggregation( rType ); \
87
} \
88
virtual void SAL_CALL acquire() throw () \
89
{ WeakAggComponentImplHelperBase::acquire(); } \
90
virtual void SAL_CALL release() throw () \
91
{ WeakAggComponentImplHelperBase::release(); } \
92
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \
93
{ return getClassData( s_aCD ).getTypes(); } \
94
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \
95
{ return getClassData( s_aCD ).getImplementationId(); } \
96
};
97
98
#define __DEF_COMPIMPLHELPER_B( N ) \
99
template< __CLASS_IFC##N > \
100
ClassData##N WeakComponentImplHelper##N< __IFC##N >::s_aCD = ClassData##N( 4 ); \
101
template< __CLASS_IFC##N > \
102
ClassData##N WeakAggComponentImplHelper##N< __IFC##N >::s_aCD = ClassData##N( 3 );
103
104
#define __DEF_COMPIMPLHELPER_C( N ) \
105
}
106
107
#define __DEF_COMPIMPLHELPER( N ) \
108
__DEF_COMPIMPLHELPER_A( N ) \
109
__DEF_COMPIMPLHELPER_B( N ) \
110
__DEF_COMPIMPLHELPER_C( N )
111
113
114
#endif
115
116
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Generated on Mon Oct 8 2012 00:36:41 for My Project by
1.8.1.2