xref: /AOO41X/main/cppu/inc/com/sun/star/uno/Any.h (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _COM_SUN_STAR_UNO_ANY_H_
28*cdf0e10cSrcweir #define _COM_SUN_STAR_UNO_ANY_H_
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <uno/any2.h>
31*cdf0e10cSrcweir #include <typelib/typedescription.h>
32*cdf0e10cSrcweir #include <com/sun/star/uno/Type.h>
33*cdf0e10cSrcweir #include "cppu/unotype.hxx"
34*cdf0e10cSrcweir #include <rtl/alloc.h>
35*cdf0e10cSrcweir 
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir namespace com
38*cdf0e10cSrcweir {
39*cdf0e10cSrcweir namespace sun
40*cdf0e10cSrcweir {
41*cdf0e10cSrcweir namespace star
42*cdf0e10cSrcweir {
43*cdf0e10cSrcweir namespace uno
44*cdf0e10cSrcweir {
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir /** C++ class representing an IDL any.
47*cdf0e10cSrcweir 	This class is used to transport any type defined in IDL. The class inherits from the
48*cdf0e10cSrcweir     binary C representation of uno_Any.
49*cdf0e10cSrcweir 	You can insert a value by either using the <<= operators or the template function makeAny().
50*cdf0e10cSrcweir     No any can hold an any. You can extract values from an any by using the >>= operators which
51*cdf0e10cSrcweir     return true if the any contains an assignable value (no data loss), e.g. the any contains a
52*cdf0e10cSrcweir     short and you >>= it into a long variable.
53*cdf0e10cSrcweir */
54*cdf0e10cSrcweir class Any : public uno_Any
55*cdf0e10cSrcweir {
56*cdf0e10cSrcweir public:
57*cdf0e10cSrcweir 	// these are here to force memory de/allocation to sal lib.
58*cdf0e10cSrcweir     /** @internal */
59*cdf0e10cSrcweir 	inline static void * SAL_CALL operator new ( size_t nSize ) SAL_THROW( () )
60*cdf0e10cSrcweir 		{ return ::rtl_allocateMemory( nSize ); }
61*cdf0e10cSrcweir     /** @internal */
62*cdf0e10cSrcweir 	inline static void SAL_CALL operator delete ( void * pMem ) SAL_THROW( () )
63*cdf0e10cSrcweir 		{ ::rtl_freeMemory( pMem ); }
64*cdf0e10cSrcweir     /** @internal */
65*cdf0e10cSrcweir 	inline static void * SAL_CALL operator new ( size_t, void * pMem ) SAL_THROW( () )
66*cdf0e10cSrcweir 		{ return pMem; }
67*cdf0e10cSrcweir     /** @internal */
68*cdf0e10cSrcweir 	inline static void SAL_CALL operator delete ( void *, void * ) SAL_THROW( () )
69*cdf0e10cSrcweir 		{}
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir 	/** Default constructor: Any holds no value; its type is void.
72*cdf0e10cSrcweir 	*/
73*cdf0e10cSrcweir 	inline Any() SAL_THROW( () );
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir     /** Templated ctor.  Sets a copy of the given value.
76*cdf0e10cSrcweir 
77*cdf0e10cSrcweir         @param value value of the Any
78*cdf0e10cSrcweir     */
79*cdf0e10cSrcweir     template <typename T>
80*cdf0e10cSrcweir     explicit inline Any( T const & value );
81*cdf0e10cSrcweir     /// Ctor support for C++ bool.
82*cdf0e10cSrcweir     explicit inline Any( bool value );
83*cdf0e10cSrcweir 
84*cdf0e10cSrcweir 	/** Copy constructor: Sets value of the given any.
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir 		@param rAny another any
87*cdf0e10cSrcweir 	*/
88*cdf0e10cSrcweir 	inline Any( const Any & rAny ) SAL_THROW( () );
89*cdf0e10cSrcweir 
90*cdf0e10cSrcweir 	/** Constructor: Sets a copy of the given data.
91*cdf0e10cSrcweir 
92*cdf0e10cSrcweir 		@param pData_ value
93*cdf0e10cSrcweir 		@param rType type of value
94*cdf0e10cSrcweir 	*/
95*cdf0e10cSrcweir 	inline Any( const void * pData_, const Type & rType ) SAL_THROW( () );
96*cdf0e10cSrcweir 
97*cdf0e10cSrcweir 	/** Constructor: Sets a copy of the given data.
98*cdf0e10cSrcweir 
99*cdf0e10cSrcweir 		@param pData_ value
100*cdf0e10cSrcweir 		@param pTypeDescr type of value
101*cdf0e10cSrcweir 	*/
102*cdf0e10cSrcweir 	inline Any( const void * pData_, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () );
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir 	/** Constructor: Sets a copy of the given data.
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir 		@param pData_ value
107*cdf0e10cSrcweir 		@param pType type of value
108*cdf0e10cSrcweir 	*/
109*cdf0e10cSrcweir 	inline Any( const void * pData_, typelib_TypeDescriptionReference * pType ) SAL_THROW( () );
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir 	/** Destructor: Destructs any content and frees memory.
112*cdf0e10cSrcweir 	*/
113*cdf0e10cSrcweir 	inline ~Any() SAL_THROW( () );
114*cdf0e10cSrcweir 
115*cdf0e10cSrcweir 	/** Assignment operator: Sets the value of the given any.
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir 		@param rAny another any (right side)
118*cdf0e10cSrcweir 		@return this any
119*cdf0e10cSrcweir 	*/
120*cdf0e10cSrcweir 	inline Any & SAL_CALL operator = ( const Any & rAny ) SAL_THROW( () );
121*cdf0e10cSrcweir 
122*cdf0e10cSrcweir 	/** Gets the type of the set value.
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir 		@return a Type object of the set value
125*cdf0e10cSrcweir 	 */
126*cdf0e10cSrcweir 	inline const Type & SAL_CALL getValueType() const SAL_THROW( () )
127*cdf0e10cSrcweir 		{ return * reinterpret_cast< const Type * >( &pType ); }
128*cdf0e10cSrcweir 	/** Gets the type of the set value.
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir 		@return the UNacquired type description reference of the set value
131*cdf0e10cSrcweir 	 */
132*cdf0e10cSrcweir 	inline typelib_TypeDescriptionReference * SAL_CALL getValueTypeRef() const SAL_THROW( () )
133*cdf0e10cSrcweir 		{ return pType; }
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir 	/** Gets the type description of the set value. Provides ownership of the type description!
136*cdf0e10cSrcweir 		Call an explicit typelib_typedescription_release() to release afterwards.
137*cdf0e10cSrcweir 
138*cdf0e10cSrcweir 		@param a pointer to type description pointer
139*cdf0e10cSrcweir 	*/
140*cdf0e10cSrcweir 	inline void SAL_CALL getValueTypeDescription( typelib_TypeDescription ** ppTypeDescr ) const SAL_THROW( () )
141*cdf0e10cSrcweir 		{ ::typelib_typedescriptionreference_getDescription( ppTypeDescr, pType ); }
142*cdf0e10cSrcweir 
143*cdf0e10cSrcweir 	/** Gets the type class of the set value.
144*cdf0e10cSrcweir 
145*cdf0e10cSrcweir 		@return the type class of the set value
146*cdf0e10cSrcweir 	 */
147*cdf0e10cSrcweir 	inline TypeClass SAL_CALL getValueTypeClass() const SAL_THROW( () )
148*cdf0e10cSrcweir 		{ return (TypeClass)pType->eTypeClass; }
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir 	/** Gets the type name of the set value.
151*cdf0e10cSrcweir 
152*cdf0e10cSrcweir 		@return the type name of the set value
153*cdf0e10cSrcweir 	*/
154*cdf0e10cSrcweir 	inline ::rtl::OUString SAL_CALL getValueTypeName() const SAL_THROW( () );
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir 	/** Tests if any contains a value.
157*cdf0e10cSrcweir 
158*cdf0e10cSrcweir 		@return true if any has a value, false otherwise
159*cdf0e10cSrcweir 	*/
160*cdf0e10cSrcweir 	inline sal_Bool SAL_CALL hasValue() const SAL_THROW( () )
161*cdf0e10cSrcweir 		{ return (typelib_TypeClass_VOID != pType->eTypeClass); }
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir 	/** Gets a pointer to the set value.
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir 		@return a pointer to the set value
166*cdf0e10cSrcweir 	*/
167*cdf0e10cSrcweir 	inline const void * SAL_CALL getValue() const SAL_THROW( () )
168*cdf0e10cSrcweir 		{ return pData; }
169*cdf0e10cSrcweir 
170*cdf0e10cSrcweir #if ! defined(EXCEPTIONS_OFF)
171*cdf0e10cSrcweir     /** Provides a value of specified type, so you can easily write e.g.
172*cdf0e10cSrcweir         <pre>
173*cdf0e10cSrcweir         sal_Int32 myVal = myAny.get<sal_Int32>();
174*cdf0e10cSrcweir         </pre>
175*cdf0e10cSrcweir         Widening conversion without data loss is taken into account.
176*cdf0e10cSrcweir         Throws a
177*cdf0e10cSrcweir         <type scope="com::sun::star::uno">RuntimeException</type>
178*cdf0e10cSrcweir         if the specified type cannot be provided.
179*cdf0e10cSrcweir 
180*cdf0e10cSrcweir         @return value of specified type
181*cdf0e10cSrcweir         @exception <type scope="com::sun::star::uno">RuntimeException</type>
182*cdf0e10cSrcweir                    in case the specified type cannot be provided
183*cdf0e10cSrcweir     */
184*cdf0e10cSrcweir     template <typename T>
185*cdf0e10cSrcweir     inline T get() const;
186*cdf0e10cSrcweir #endif // ! defined(EXCEPTIONS_OFF)
187*cdf0e10cSrcweir 
188*cdf0e10cSrcweir 	/** Sets a value. If the any already contains a value, that value will be destructed
189*cdf0e10cSrcweir         and its memory freed.
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir 		@param pData_ pointer to value
192*cdf0e10cSrcweir 		@param rType type of value
193*cdf0e10cSrcweir 	*/
194*cdf0e10cSrcweir 	inline void SAL_CALL setValue( const void * pData_, const Type & rType ) SAL_THROW( () );
195*cdf0e10cSrcweir 	/** Sets a value. If the any already contains a value, that value will be destructed
196*cdf0e10cSrcweir 		and its memory freed.
197*cdf0e10cSrcweir 
198*cdf0e10cSrcweir 		@param pData_ pointer to value
199*cdf0e10cSrcweir 		@param pType type of value
200*cdf0e10cSrcweir 	*/
201*cdf0e10cSrcweir 	inline void SAL_CALL setValue( const void * pData_, typelib_TypeDescriptionReference * pType ) SAL_THROW( () );
202*cdf0e10cSrcweir 	/** Sets a value. If the any already contains a value, that value will be destructed
203*cdf0e10cSrcweir 		and its memory freed.
204*cdf0e10cSrcweir 
205*cdf0e10cSrcweir 		@param pData_ pointer to value
206*cdf0e10cSrcweir 		@param pTypeDescr type description of value
207*cdf0e10cSrcweir 	*/
208*cdf0e10cSrcweir 	inline void SAL_CALL setValue( const void * pData_, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () );
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 	/** Clears this any. If the any already contains a value, that value will be destructed
211*cdf0e10cSrcweir 		and its memory freed. After this has been called, the any does not contain a value.
212*cdf0e10cSrcweir 	*/
213*cdf0e10cSrcweir 	inline void SAL_CALL clear() SAL_THROW( () );
214*cdf0e10cSrcweir 
215*cdf0e10cSrcweir 	/** Tests whether this any is extractable to a value of given type.
216*cdf0e10cSrcweir         Widening conversion without data loss is taken into account.
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir 		@param rType destination type
219*cdf0e10cSrcweir 		@return true if this any is extractable to value of given type (e.g. using >>= operator)
220*cdf0e10cSrcweir 	*/
221*cdf0e10cSrcweir 	inline sal_Bool SAL_CALL isExtractableTo( const Type & rType ) const SAL_THROW( () );
222*cdf0e10cSrcweir 
223*cdf0e10cSrcweir 	/** Tests whether this any can provide a value of specified type.
224*cdf0e10cSrcweir         Widening conversion without data loss is taken into account.
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir 		@return true if this any can provide a value of specified type
227*cdf0e10cSrcweir 		(e.g. using >>= operator)
228*cdf0e10cSrcweir 	*/
229*cdf0e10cSrcweir     template <typename T>
230*cdf0e10cSrcweir 	inline bool has() const;
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir 	/** Equality operator: compares two anys.
233*cdf0e10cSrcweir 		The values need not be of equal type, e.g. a short integer is compared to a long integer.
234*cdf0e10cSrcweir 
235*cdf0e10cSrcweir 		@param rAny another any (right side)
236*cdf0e10cSrcweir 		@return true if both any contains equal values
237*cdf0e10cSrcweir 	*/
238*cdf0e10cSrcweir 	inline sal_Bool SAL_CALL operator == ( const Any & rAny ) const SAL_THROW( () );
239*cdf0e10cSrcweir 	/** Unequality operator: compares two anys.
240*cdf0e10cSrcweir 		The values need not be of equal type, e.g. a short integer is compared to a long integer.
241*cdf0e10cSrcweir 
242*cdf0e10cSrcweir 		@param rAny another any (right side)
243*cdf0e10cSrcweir 		@return true if both any contains unequal values
244*cdf0e10cSrcweir 	*/
245*cdf0e10cSrcweir 	inline sal_Bool SAL_CALL operator != ( const Any & rAny ) const SAL_THROW( () );
246*cdf0e10cSrcweir 
247*cdf0e10cSrcweir private:
248*cdf0e10cSrcweir     // not impl: forbid use with ambiguous type (sal_Unicode, sal_uInt16)
249*cdf0e10cSrcweir     explicit Any( sal_uInt16 );
250*cdf0e10cSrcweir #if defined(_MSC_VER)
251*cdf0e10cSrcweir     // Omitting the following private declarations leads to an internal compiler
252*cdf0e10cSrcweir     // error on MSVC (version 1310).
253*cdf0e10cSrcweir     // not impl: forbid use with ambiguous type (sal_Unicode, sal_uInt16)
254*cdf0e10cSrcweir #if ! defined(EXCEPTIONS_OFF)
255*cdf0e10cSrcweir     template <>
256*cdf0e10cSrcweir     sal_uInt16 get<sal_uInt16>() const;
257*cdf0e10cSrcweir #endif // ! defined(EXCEPTIONS_OFF)
258*cdf0e10cSrcweir     template <>
259*cdf0e10cSrcweir 	bool has<sal_uInt16>() const;
260*cdf0e10cSrcweir #endif // defined(_MSC_VER)
261*cdf0e10cSrcweir };
262*cdf0e10cSrcweir 
263*cdf0e10cSrcweir /** Template function to generically construct an any from a C++ value.
264*cdf0e10cSrcweir 
265*cdf0e10cSrcweir     @tplparam C value type
266*cdf0e10cSrcweir 	@param value a value
267*cdf0e10cSrcweir 	@return an any
268*cdf0e10cSrcweir */
269*cdf0e10cSrcweir template< class C >
270*cdf0e10cSrcweir inline Any SAL_CALL makeAny( const C & value ) SAL_THROW( () );
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir // additionally specialized for C++ bool
273*cdf0e10cSrcweir template<>
274*cdf0e10cSrcweir inline Any SAL_CALL makeAny( bool const & value ) SAL_THROW( () );
275*cdf0e10cSrcweir 
276*cdf0e10cSrcweir class BaseReference;
277*cdf0e10cSrcweir class Type;
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir /** Template binary <<= operator to set the value of an any.
280*cdf0e10cSrcweir 
281*cdf0e10cSrcweir     @tplparam C value type
282*cdf0e10cSrcweir 	@param rAny destination any (left side)
283*cdf0e10cSrcweir 	@param value source value (right side)
284*cdf0e10cSrcweir */
285*cdf0e10cSrcweir template< class C >
286*cdf0e10cSrcweir inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) SAL_THROW( () );
287*cdf0e10cSrcweir 
288*cdf0e10cSrcweir // additionally for C++ bool:
289*cdf0e10cSrcweir inline void SAL_CALL operator <<= ( Any & rAny, bool const & value )
290*cdf0e10cSrcweir     SAL_THROW( () );
291*cdf0e10cSrcweir 
292*cdf0e10cSrcweir /** Template binary >>= operator to assign a value from an any.
293*cdf0e10cSrcweir 	If the any does not contain a value that can be assigned without data loss, then this
294*cdf0e10cSrcweir     operation will fail returning false.
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir     @tplparam C value type
297*cdf0e10cSrcweir 	@param rAny source any (left side)
298*cdf0e10cSrcweir 	@param value destination value (right side)
299*cdf0e10cSrcweir 	@return true if assignment was possible without data loss
300*cdf0e10cSrcweir */
301*cdf0e10cSrcweir template< class C >
302*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, C & value ) SAL_THROW( () );
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir /** Template equality operator: compares set value of left side any to right side value.
305*cdf0e10cSrcweir 	The values need not be of equal type, e.g. a short integer is compared to a long integer.
306*cdf0e10cSrcweir 	This operator can be implemented as template member function, if all supported compilers
307*cdf0e10cSrcweir     can cope with template member functions.
308*cdf0e10cSrcweir 
309*cdf0e10cSrcweir     @tplparam C value type
310*cdf0e10cSrcweir 	@param rAny another any (left side)
311*cdf0e10cSrcweir 	@param value a value (right side)
312*cdf0e10cSrcweir 	@return true if values are equal, false otherwise
313*cdf0e10cSrcweir */
314*cdf0e10cSrcweir template< class C >
315*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator == ( const Any & rAny, const C & value ) SAL_THROW( () );
316*cdf0e10cSrcweir /** Template unequality operator: compares set value of left side any to right side value.
317*cdf0e10cSrcweir 	The values need not be of equal type, e.g. a short integer is compared to a long integer.
318*cdf0e10cSrcweir 	This operator can be implemented as template member function, if all supported compilers
319*cdf0e10cSrcweir     can cope with template member functions.
320*cdf0e10cSrcweir 
321*cdf0e10cSrcweir     @tplparam C value type
322*cdf0e10cSrcweir 	@param rAny another any (left side)
323*cdf0e10cSrcweir 	@param value a value (right side)
324*cdf0e10cSrcweir 	@return true if values are unequal, false otherwise
325*cdf0e10cSrcweir */
326*cdf0e10cSrcweir template< class C >
327*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator != ( const Any & rAny, const C & value ) SAL_THROW( () );
328*cdf0e10cSrcweir 
329*cdf0e10cSrcweir // additional specialized >>= and == operators
330*cdf0e10cSrcweir // bool
331*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Bool & value ) SAL_THROW( () );
332*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) SAL_THROW( () );
333*cdf0e10cSrcweir template<>
334*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( Any const & rAny, bool & value )
335*cdf0e10cSrcweir     SAL_THROW( () );
336*cdf0e10cSrcweir template<>
337*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator == ( Any const & rAny, bool const & value )
338*cdf0e10cSrcweir     SAL_THROW( () );
339*cdf0e10cSrcweir // byte
340*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int8 & value ) SAL_THROW( () );
341*cdf0e10cSrcweir // short
342*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) SAL_THROW( () );
343*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) SAL_THROW( () );
344*cdf0e10cSrcweir // long
345*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) SAL_THROW( () );
346*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) SAL_THROW( () );
347*cdf0e10cSrcweir // hyper
348*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) SAL_THROW( () );
349*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) SAL_THROW( () );
350*cdf0e10cSrcweir // float
351*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) SAL_THROW( () );
352*cdf0e10cSrcweir // double
353*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) SAL_THROW( () );
354*cdf0e10cSrcweir // string
355*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value ) SAL_THROW( () );
356*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) SAL_THROW( () );
357*cdf0e10cSrcweir // type
358*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THROW( () );
359*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) SAL_THROW( () );
360*cdf0e10cSrcweir // any
361*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) SAL_THROW( () );
362*cdf0e10cSrcweir // interface
363*cdf0e10cSrcweir inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value ) SAL_THROW( () );
364*cdf0e10cSrcweir 
365*cdf0e10cSrcweir }
366*cdf0e10cSrcweir }
367*cdf0e10cSrcweir }
368*cdf0e10cSrcweir }
369*cdf0e10cSrcweir 
370*cdf0e10cSrcweir /** Gets the meta type of IDL type any.
371*cdf0e10cSrcweir 
372*cdf0e10cSrcweir     There are cases (involving templates) where uses of getCppuType are known to
373*cdf0e10cSrcweir     not compile.  Use cppu::UnoType or cppu::getTypeFavourUnsigned instead.
374*cdf0e10cSrcweir 
375*cdf0e10cSrcweir 	@param dummy typed pointer for function signature
376*cdf0e10cSrcweir 	@return type of IDL type any
377*cdf0e10cSrcweir */
378*cdf0e10cSrcweir inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Any * ) SAL_THROW( () )
379*cdf0e10cSrcweir {
380*cdf0e10cSrcweir     return ::cppu::UnoType< ::com::sun::star::uno::Any >::get();
381*cdf0e10cSrcweir }
382*cdf0e10cSrcweir 
383*cdf0e10cSrcweir #endif
384