primeweak.cxx (5696ffe9) primeweak.cxx (c52956d9)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 13 unchanged lines hidden (view full) ---

22// MARKER(update_precomp.py): autogen include statement, do not remove
23#include "precompiled_cppuhelper.hxx"
24
25// The only purpose of this file is to workaround a problem in UNO:
26// Cppumaker and its brethren emit different implementations for
27// the same symbol by design (!) which is quite... unfortunate
28// and can confuse the heck out of dynamic linkers, debuggers, etc.
29//
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 13 unchanged lines hidden (view full) ---

22// MARKER(update_precomp.py): autogen include statement, do not remove
23#include "precompiled_cppuhelper.hxx"
24
25// The only purpose of this file is to workaround a problem in UNO:
26// Cppumaker and its brethren emit different implementations for
27// the same symbol by design (!) which is quite... unfortunate
28// and can confuse the heck out of dynamic linkers, debuggers, etc.
29//
30// For bootstrapping comprehensive descriptions of some UNO types are needed.
30// For bootstrapping the comprehensive descriptions of some UNO types are needed.
31// The mechanism in this file makes sure that these comprehensive type
32// descriptions are used to prime the so-called "WeakMap".
33//
34// TODO: change cppumaker and its brethren to use different symbol names
35// for different implementations. In particular "cppu_detail_getUnoType"
36// should be divided into full, weak and mini implementations.
37
38// Types that are candidates for this special workaround are the ones mentioned
39// by the exceptions thrown from implbase_ex.cxx's __queryDeepNoXInterface()
40// that also need to added to the makefile's UNOTYPES define
41
42#define cppu_detail_getUnoType cppu_full_getUnoType
43#define InitTypeDesc(T) {(void)cppu_full_getUnoType(static_cast< T * >(NULL));}
44
31// The mechanism in this file makes sure that these comprehensive type
32// descriptions are used to prime the so-called "WeakMap".
33//
34// TODO: change cppumaker and its brethren to use different symbol names
35// for different implementations. In particular "cppu_detail_getUnoType"
36// should be divided into full, weak and mini implementations.
37
38// Types that are candidates for this special workaround are the ones mentioned
39// by the exceptions thrown from implbase_ex.cxx's __queryDeepNoXInterface()
40// that also need to added to the makefile's UNOTYPES define
41
42#define cppu_detail_getUnoType cppu_full_getUnoType
43#define InitTypeDesc(T) {(void)cppu_full_getUnoType(static_cast< T * >(NULL));}
44
45// NOTE: the cppuhelper part in the include paths below ensures that the type descriptions
46// are comprehensive descriptions and not some weak descriptions e.g. from solver
45#include "cppuhelper/com/sun/star/lang/XComponent.hpp"
46#include "cppuhelper/com/sun/star/lang/XInitialization.hpp"
47#include "cppuhelper/com/sun/star/lang/XSingleServiceFactory.hpp"
48#include "cppuhelper/com/sun/star/lang/XSingleComponentFactory.hpp"
49#include "cppuhelper/com/sun/star/lang/XMultiServiceFactory.hpp"
50#include "cppuhelper/com/sun/star/lang/XMultiComponentFactory.hpp"
51#include "cppuhelper/com/sun/star/lang/XServiceInfo.hpp"
52#include "cppuhelper/com/sun/star/lang/XEventListener.hpp"
53#include "cppuhelper/com/sun/star/lang/XTypeProvider.hpp"
54#include "cppuhelper/com/sun/star/lang/XUnoTunnel.hpp"
47#include "cppuhelper/com/sun/star/lang/XComponent.hpp"
48#include "cppuhelper/com/sun/star/lang/XInitialization.hpp"
49#include "cppuhelper/com/sun/star/lang/XSingleServiceFactory.hpp"
50#include "cppuhelper/com/sun/star/lang/XSingleComponentFactory.hpp"
51#include "cppuhelper/com/sun/star/lang/XMultiServiceFactory.hpp"
52#include "cppuhelper/com/sun/star/lang/XMultiComponentFactory.hpp"
53#include "cppuhelper/com/sun/star/lang/XServiceInfo.hpp"
54#include "cppuhelper/com/sun/star/lang/XEventListener.hpp"
55#include "cppuhelper/com/sun/star/lang/XTypeProvider.hpp"
56#include "cppuhelper/com/sun/star/lang/XUnoTunnel.hpp"
57#include "cppuhelper/com/sun/star/lang/DisposedException.hpp"
55#include "cppuhelper/com/sun/star/uno/DeploymentException.hpp"
56#include "cppuhelper/com/sun/star/uno/XWeak.hpp"
57#include "cppuhelper/com/sun/star/uno/XCurrentContext.hpp"
58#include "cppuhelper/com/sun/star/uno/XComponentContext.hpp"
59#include "cppuhelper/com/sun/star/uno/RuntimeException.hpp"
58#include "cppuhelper/com/sun/star/uno/DeploymentException.hpp"
59#include "cppuhelper/com/sun/star/uno/XWeak.hpp"
60#include "cppuhelper/com/sun/star/uno/XCurrentContext.hpp"
61#include "cppuhelper/com/sun/star/uno/XComponentContext.hpp"
62#include "cppuhelper/com/sun/star/uno/RuntimeException.hpp"
63#include "cppuhelper/com/sun/star/util/XMacroExpander.hpp"
60#include "cppuhelper/com/sun/star/beans/PropertyValue.hpp"
61#include "cppuhelper/com/sun/star/beans/XPropertySet.hpp"
62#include "cppuhelper/com/sun/star/beans/XMultiPropertySet.hpp"
63#include "cppuhelper/com/sun/star/container/XEnumerationAccess.hpp"
64#include "cppuhelper/com/sun/star/container/XEnumeration.hpp"
64#include "cppuhelper/com/sun/star/beans/PropertyValue.hpp"
65#include "cppuhelper/com/sun/star/beans/XPropertySet.hpp"
66#include "cppuhelper/com/sun/star/beans/XMultiPropertySet.hpp"
67#include "cppuhelper/com/sun/star/container/XEnumerationAccess.hpp"
68#include "cppuhelper/com/sun/star/container/XEnumeration.hpp"
69#include "cppuhelper/com/sun/star/container/XNameAccess.hpp"
70#include "cppuhelper/com/sun/star/container/XNameReplace.hpp"
71#include "cppuhelper/com/sun/star/container/XNameContainer.hpp"
65#include "cppuhelper/com/sun/star/container/XHierarchicalNameAccess.hpp"
66#include "cppuhelper/com/sun/star/container/XSet.hpp"
67#include "cppuhelper/com/sun/star/bridge/XUnoUrlResolver.hpp"
72#include "cppuhelper/com/sun/star/container/XHierarchicalNameAccess.hpp"
73#include "cppuhelper/com/sun/star/container/XSet.hpp"
74#include "cppuhelper/com/sun/star/bridge/XUnoUrlResolver.hpp"
68#include "cppuhelper/com/sun/star/bridge/XUnoUrlResolver.hpp"
69#include "cppuhelper/com/sun/star/io/IOException.hpp"
70#include "cppuhelper/com/sun/star/io/FilePermission.hpp"
71#include "cppuhelper/com/sun/star/security/RuntimePermission.hpp"
72#include "cppuhelper/com/sun/star/loader/XImplementationLoader.hpp"
73#include "cppuhelper/com/sun/star/security/XAccessController.hpp"
74#include "cppuhelper/com/sun/star/registry/XRegistryKey.hpp"
75#include "cppuhelper/com/sun/star/registry/XSimpleRegistry.hpp"
76#include "cppuhelper/com/sun/star/reflection/XTypeDescription.hpp"
77#include "cppuhelper/com/sun/star/reflection/XEnumTypeDescription.hpp"
78#include "cppuhelper/com/sun/star/reflection/XArrayTypeDescription.hpp"
79#include "cppuhelper/com/sun/star/reflection/XStructTypeDescription.hpp"
80#include "cppuhelper/com/sun/star/reflection/XUnionTypeDescription.hpp"
81#include "cppuhelper/com/sun/star/reflection/XCompoundTypeDescription.hpp"
82#include "cppuhelper/com/sun/star/reflection/XIndirectTypeDescription.hpp"
75#include "cppuhelper/com/sun/star/io/IOException.hpp"
76#include "cppuhelper/com/sun/star/io/FilePermission.hpp"
77#include "cppuhelper/com/sun/star/security/RuntimePermission.hpp"
78#include "cppuhelper/com/sun/star/loader/XImplementationLoader.hpp"
79#include "cppuhelper/com/sun/star/security/XAccessController.hpp"
80#include "cppuhelper/com/sun/star/registry/XRegistryKey.hpp"
81#include "cppuhelper/com/sun/star/registry/XSimpleRegistry.hpp"
82#include "cppuhelper/com/sun/star/reflection/XTypeDescription.hpp"
83#include "cppuhelper/com/sun/star/reflection/XEnumTypeDescription.hpp"
84#include "cppuhelper/com/sun/star/reflection/XArrayTypeDescription.hpp"
85#include "cppuhelper/com/sun/star/reflection/XStructTypeDescription.hpp"
86#include "cppuhelper/com/sun/star/reflection/XUnionTypeDescription.hpp"
87#include "cppuhelper/com/sun/star/reflection/XCompoundTypeDescription.hpp"
88#include "cppuhelper/com/sun/star/reflection/XIndirectTypeDescription.hpp"
89#include "cppuhelper/com/sun/star/reflection/XInterfaceTypeDescription.hpp"
90#include "cppuhelper/com/sun/star/reflection/XInterfaceMemberTypeDescription.hpp"
91#include "cppuhelper/com/sun/star/reflection/XInterfaceMethodTypeDescription.hpp"
83#include "cppuhelper/com/sun/star/reflection/XMethodParameter.hpp"
84
85void primeWeakMap( void)
86{
87 InitTypeDesc( com::sun::star::lang::XComponent );
88 InitTypeDesc( com::sun::star::lang::XInitialization );
89 InitTypeDesc( com::sun::star::lang::XSingleServiceFactory );
90 InitTypeDesc( com::sun::star::lang::XSingleComponentFactory );
91 InitTypeDesc( com::sun::star::lang::XMultiServiceFactory );
92 InitTypeDesc( com::sun::star::lang::XMultiComponentFactory );
93 InitTypeDesc( com::sun::star::lang::XServiceInfo );
94 InitTypeDesc( com::sun::star::lang::XEventListener );
95 InitTypeDesc( com::sun::star::lang::XTypeProvider );
96 InitTypeDesc( com::sun::star::lang::XUnoTunnel );
92#include "cppuhelper/com/sun/star/reflection/XMethodParameter.hpp"
93
94void primeWeakMap( void)
95{
96 InitTypeDesc( com::sun::star::lang::XComponent );
97 InitTypeDesc( com::sun::star::lang::XInitialization );
98 InitTypeDesc( com::sun::star::lang::XSingleServiceFactory );
99 InitTypeDesc( com::sun::star::lang::XSingleComponentFactory );
100 InitTypeDesc( com::sun::star::lang::XMultiServiceFactory );
101 InitTypeDesc( com::sun::star::lang::XMultiComponentFactory );
102 InitTypeDesc( com::sun::star::lang::XServiceInfo );
103 InitTypeDesc( com::sun::star::lang::XEventListener );
104 InitTypeDesc( com::sun::star::lang::XTypeProvider );
105 InitTypeDesc( com::sun::star::lang::XUnoTunnel );
106 InitTypeDesc( com::sun::star::lang::DisposedException );
97 InitTypeDesc( com::sun::star::uno::XWeak );
98 InitTypeDesc( com::sun::star::uno::DeploymentException );
99 InitTypeDesc( com::sun::star::uno::XCurrentContext );
100 InitTypeDesc( com::sun::star::uno::XComponentContext );
101 InitTypeDesc( com::sun::star::uno::RuntimeException );
107 InitTypeDesc( com::sun::star::uno::XWeak );
108 InitTypeDesc( com::sun::star::uno::DeploymentException );
109 InitTypeDesc( com::sun::star::uno::XCurrentContext );
110 InitTypeDesc( com::sun::star::uno::XComponentContext );
111 InitTypeDesc( com::sun::star::uno::RuntimeException );
112 InitTypeDesc( com::sun::star::util::XMacroExpander );
102 InitTypeDesc( com::sun::star::beans::PropertyState );
103 InitTypeDesc( com::sun::star::beans::PropertyValue );
104 InitTypeDesc( com::sun::star::beans::XPropertySet );
105 InitTypeDesc( com::sun::star::beans::XMultiPropertySet );
106 InitTypeDesc( com::sun::star::container::XElementAccess );
107 InitTypeDesc( com::sun::star::container::XEnumeration );
108 InitTypeDesc( com::sun::star::container::XEnumerationAccess );
109 InitTypeDesc( com::sun::star::container::XHierarchicalNameAccess );
113 InitTypeDesc( com::sun::star::beans::PropertyState );
114 InitTypeDesc( com::sun::star::beans::PropertyValue );
115 InitTypeDesc( com::sun::star::beans::XPropertySet );
116 InitTypeDesc( com::sun::star::beans::XMultiPropertySet );
117 InitTypeDesc( com::sun::star::container::XElementAccess );
118 InitTypeDesc( com::sun::star::container::XEnumeration );
119 InitTypeDesc( com::sun::star::container::XEnumerationAccess );
120 InitTypeDesc( com::sun::star::container::XHierarchicalNameAccess );
121 InitTypeDesc( com::sun::star::container::XNameAccess );
122 InitTypeDesc( com::sun::star::container::XNameReplace );
123 InitTypeDesc( com::sun::star::container::XNameContainer );
110 InitTypeDesc( com::sun::star::container::XSet );
111 InitTypeDesc( com::sun::star::io::IOException );
112 InitTypeDesc( com::sun::star::io::FilePermission );
113 InitTypeDesc( com::sun::star::security::XAccessController );
114 InitTypeDesc( com::sun::star::security::RuntimePermission);
115 InitTypeDesc( com::sun::star::loader::XImplementationLoader );
116 InitTypeDesc( com::sun::star::bridge::XUnoUrlResolver );
117 InitTypeDesc( com::sun::star::registry::XRegistryKey );
118 InitTypeDesc( com::sun::star::registry::XSimpleRegistry );
119 InitTypeDesc( com::sun::star::reflection::XTypeDescription );
120 InitTypeDesc( com::sun::star::reflection::XEnumTypeDescription );
121 InitTypeDesc( com::sun::star::reflection::XArrayTypeDescription );
122 InitTypeDesc( com::sun::star::reflection::XStructTypeDescription );
123 InitTypeDesc( com::sun::star::reflection::XUnionTypeDescription );
124 InitTypeDesc( com::sun::star::reflection::XCompoundTypeDescription );
125 InitTypeDesc( com::sun::star::reflection::XIndirectTypeDescription );
124 InitTypeDesc( com::sun::star::container::XSet );
125 InitTypeDesc( com::sun::star::io::IOException );
126 InitTypeDesc( com::sun::star::io::FilePermission );
127 InitTypeDesc( com::sun::star::security::XAccessController );
128 InitTypeDesc( com::sun::star::security::RuntimePermission);
129 InitTypeDesc( com::sun::star::loader::XImplementationLoader );
130 InitTypeDesc( com::sun::star::bridge::XUnoUrlResolver );
131 InitTypeDesc( com::sun::star::registry::XRegistryKey );
132 InitTypeDesc( com::sun::star::registry::XSimpleRegistry );
133 InitTypeDesc( com::sun::star::reflection::XTypeDescription );
134 InitTypeDesc( com::sun::star::reflection::XEnumTypeDescription );
135 InitTypeDesc( com::sun::star::reflection::XArrayTypeDescription );
136 InitTypeDesc( com::sun::star::reflection::XStructTypeDescription );
137 InitTypeDesc( com::sun::star::reflection::XUnionTypeDescription );
138 InitTypeDesc( com::sun::star::reflection::XCompoundTypeDescription );
139 InitTypeDesc( com::sun::star::reflection::XIndirectTypeDescription );
140 InitTypeDesc( com::sun::star::reflection::XInterfaceTypeDescription );
141 InitTypeDesc( com::sun::star::reflection::XInterfaceMemberTypeDescription );
142 InitTypeDesc( com::sun::star::reflection::XInterfaceMethodTypeDescription );
126 InitTypeDesc( com::sun::star::reflection::XMethodParameter );
127}
128
143 InitTypeDesc( com::sun::star::reflection::XMethodParameter );
144}
145