28 #ifndef _COM_SUN_STAR_UNO_ANY_HXX_
29 #define _COM_SUN_STAR_UNO_ANY_HXX_
34 #include <com/sun/star/uno/XInterface.hpp>
58 this, const_cast<T *>(&value),
80 this, const_cast< void * >( pData_ ), rType.getTypeLibType(),
107 this, rAny.pData, rAny.pType,
121 this, const_cast< void * >( pData_ ), rType.getTypeLibType(),
128 this, const_cast< void * >( pData_ ), pType_,
135 this, const_cast< void * >( pData_ ), pTypeDescr,
148 rType.getTypeLibType(), pData, pType,
153 template <
typename T>
162 #if ! defined(__SUNPRO_CC)
165 bool Any::has<sal_uInt16>()
const;
166 #endif // ! defined(__SUNPRO_CC)
172 pData, pType, rAny.pData, rAny.pType,
179 pData, pType, rAny.pData, rAny.pType,
227 rAny.pData, rAny.
pType,
247 (value !=
sal_False) == (* reinterpret_cast< const sal_Bool * >( rAny.pData ) !=
sal_False));
257 value = *
reinterpret_cast< sal_Bool const *
>(
271 (*reinterpret_cast< sal_Bool const * >( rAny.pData )
281 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
290 switch (rAny.pType->eTypeClass)
293 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
297 value = *
reinterpret_cast< const sal_Int16 *
>( rAny.pData );
306 switch (rAny.pType->eTypeClass)
309 value = (sal_uInt16)( * reinterpret_cast< const sal_Int8 * >( rAny.pData ) );
313 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
323 switch (rAny.pType->eTypeClass)
326 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
329 value = *
reinterpret_cast< const sal_Int16 *
>( rAny.pData );
332 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
336 value = *
reinterpret_cast< const sal_Int32 *
>( rAny.pData );
345 switch (rAny.pType->eTypeClass)
348 value = (sal_uInt32)( * reinterpret_cast< const sal_Int8 * >( rAny.pData ) );
351 value = (sal_uInt32)( * reinterpret_cast< const sal_Int16 * >( rAny.pData ) );
354 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
358 value = *
reinterpret_cast< const sal_uInt32 *
>( rAny.pData );
368 switch (rAny.pType->eTypeClass)
371 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
374 value = *
reinterpret_cast< const sal_Int16 *
>( rAny.pData );
377 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
380 value = *
reinterpret_cast< const sal_Int32 *
>( rAny.pData );
383 value = *
reinterpret_cast< const sal_uInt32 *
>( rAny.pData );
387 value = *
reinterpret_cast< const sal_Int64 *
>( rAny.pData );
396 switch (rAny.pType->eTypeClass)
399 value = (sal_uInt64)( * reinterpret_cast< const sal_Int8 * >( rAny.pData ) );
402 value = (sal_uInt64)( * reinterpret_cast< const sal_Int16 * >( rAny.pData ) );
405 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
408 value = (sal_uInt64)( * reinterpret_cast< const sal_Int32 * >( rAny.pData ) );
411 value = *
reinterpret_cast< const sal_uInt32 *
>( rAny.pData );
415 value = *
reinterpret_cast< const sal_uInt64 *
>( rAny.pData );
425 switch (rAny.pType->eTypeClass)
428 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
431 value = *
reinterpret_cast< const sal_Int16 *
>( rAny.pData );
434 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
437 value = *
reinterpret_cast< const float *
>( rAny.pData );
447 switch (rAny.pType->eTypeClass)
450 value = *
reinterpret_cast< const sal_Int8 *
>( rAny.pData );
453 value = *
reinterpret_cast< const sal_Int16 *
>( rAny.pData );
456 value = *
reinterpret_cast< const sal_uInt16 *
>( rAny.pData );
459 value = *
reinterpret_cast< const sal_Int32 *
>( rAny.pData );
462 value = *
reinterpret_cast< const sal_uInt32 *
>( rAny.pData );
465 value = *
reinterpret_cast< const float *
>( rAny.pData );
468 value = *
reinterpret_cast< const double *
>( rAny.pData );
480 value = *
reinterpret_cast< const ::
rtl::OUString *
>( rAny.pData );
489 value.equals( * reinterpret_cast< const ::rtl::OUString * >( rAny.pData ) ));
497 value = *
reinterpret_cast< const Type *
>( rAny.pData );
506 value.equals( * reinterpret_cast< const Type * >( rAny.pData ) ));
515 &value, rAny.pData, rAny.pType,
526 return reinterpret_cast< const BaseReference *
>( rAny.pData )->
operator == ( value );
538 rAny.pData, rAny.pType,
547 return (!
operator == ( rAny, value ));
550 #if ! defined(EXCEPTIONS_OFF)
556 template <
typename T>
560 if (! (*
this >>= value)) {
561 throw RuntimeException(
573 sal_uInt16 Any::get<sal_uInt16>()
const;
574 #endif // ! defined(EXCEPTIONS_OFF)