19 #ifndef _COM_SUN_STAR_UNO_ANY_HXX_
20 #define _COM_SUN_STAR_UNO_ANY_HXX_
25 #include <com/sun/star/uno/XInterface.hpp>
49 this, const_cast<T *>(&value),
71 this, const_cast< void * >( pData_ ), rType.getTypeLibType(),
98 this, rAny.pData, rAny.pType,
112 this, const_cast< void * >( pData_ ), rType.getTypeLibType(),
119 this, const_cast< void * >( pData_ ), pType_,
126 this, const_cast< void * >( pData_ ), pTypeDescr,
139 rType.getTypeLibType(), pData, pType,
144 template <
typename T>
153 #if ! defined(__SUNPRO_CC)
156 bool Any::has<sal_uInt16>()
const;
157 #endif // ! defined(__SUNPRO_CC)
163 pData, pType, rAny.pData, rAny.pType,
170 pData, pType, rAny.pData, rAny.pType,
191 #ifdef RTL_FAST_STRING
192 template<
class C1,
class C2 >
193 inline Any SAL_CALL
makeAny(
const rtl::OUStringConcat< C1, C2 >& value )
SAL_THROW(())
221 #ifdef RTL_FAST_STRING
222 template<
class C1,
class C2 >
223 inline void SAL_CALL operator <<= ( Any & rAny, const rtl::OUStringConcat< C1, C2 >& value )
229 &rAny, const_cast< rtl::OUString * >( &str ), rType.getTypeLibType(),
240 rAny.pData, rAny.
pType,
260 (value !=
sal_False) == (* reinterpret_cast< const sal_Bool * >( rAny.pData ) !=
sal_False));
270 value = *
reinterpret_cast< sal_Bool const *
>(
284 (*reinterpret_cast< sal_Bool const * >( rAny.pData )
294 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
303 switch (rAny.pType->eTypeClass)
306 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
310 value = *
reinterpret_cast< const sal_Int16 *
>( rAny.pData );
319 switch (rAny.pType->eTypeClass)
322 value = (sal_uInt16)( * reinterpret_cast< const sal_Int8 * >( rAny.pData ) );
326 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
336 switch (rAny.pType->eTypeClass)
339 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
342 value = *
reinterpret_cast< const sal_Int16 *
>( rAny.pData );
345 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
349 value = *
reinterpret_cast< const sal_Int32 *
>( rAny.pData );
358 switch (rAny.pType->eTypeClass)
361 value = (sal_uInt32)( * reinterpret_cast< const sal_Int8 * >( rAny.pData ) );
364 value = (sal_uInt32)( * reinterpret_cast< const sal_Int16 * >( rAny.pData ) );
367 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
371 value = *
reinterpret_cast< const sal_uInt32 *
>( rAny.pData );
381 switch (rAny.pType->eTypeClass)
384 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
387 value = *
reinterpret_cast< const sal_Int16 *
>( rAny.pData );
390 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
393 value = *
reinterpret_cast< const sal_Int32 *
>( rAny.pData );
396 value = *
reinterpret_cast< const sal_uInt32 *
>( rAny.pData );
400 value = *
reinterpret_cast< const sal_Int64 *
>( rAny.pData );
409 switch (rAny.pType->eTypeClass)
412 value = (sal_uInt64)( * reinterpret_cast< const sal_Int8 * >( rAny.pData ) );
415 value = (sal_uInt64)( * reinterpret_cast< const sal_Int16 * >( rAny.pData ) );
418 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
421 value = (sal_uInt64)( * reinterpret_cast< const sal_Int32 * >( rAny.pData ) );
424 value = *
reinterpret_cast< const sal_uInt32 *
>( rAny.pData );
428 value = *
reinterpret_cast< const sal_uInt64 *
>( rAny.pData );
438 switch (rAny.pType->eTypeClass)
441 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
444 value = *
reinterpret_cast< const sal_Int16 *
>( rAny.pData );
447 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
450 value = *
reinterpret_cast< const float *
>( rAny.pData );
460 switch (rAny.pType->eTypeClass)
463 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
466 value = *
reinterpret_cast< const sal_Int16 *
>( rAny.pData );
469 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
472 value = *
reinterpret_cast< const sal_Int32 *
>( rAny.pData );
475 value = *
reinterpret_cast< const sal_uInt32 *
>( rAny.pData );
478 value = *
reinterpret_cast< const float *
>( rAny.pData );
481 value = *
reinterpret_cast< const double *
>( rAny.pData );
493 value = *
reinterpret_cast< const ::
rtl::OUString *
>( rAny.pData );
502 value.equals( * reinterpret_cast< const ::rtl::OUString * >( rAny.pData ) ));
510 value = *
reinterpret_cast< const Type *
>( rAny.pData );
519 value.equals( * reinterpret_cast< const Type * >( rAny.pData ) ));
528 &value, rAny.pData, rAny.pType,
539 return reinterpret_cast< const BaseReference *
>( rAny.pData )->
operator == ( value );
551 rAny.pData, rAny.pType,
560 return (!
operator == ( rAny, value ));
563 #if ! defined(EXCEPTIONS_OFF)
569 template <
typename T>
573 if (! (*
this >>= value)) {
574 throw RuntimeException(
586 sal_uInt16 Any::get<sal_uInt16>()
const;
587 #endif // ! defined(EXCEPTIONS_OFF)