19 #ifndef _COM_SUN_STAR_UNO_ANY_H_
20 #define _COM_SUN_STAR_UNO_ANY_H_
51 inline static void * SAL_CALL
operator new (
size_t nSize )
SAL_THROW(())
53 inline static void SAL_CALL
operator delete (
void * pMem )
SAL_THROW(())
55 inline static void * SAL_CALL
operator new ( size_t,
void * pMem )
SAL_THROW(())
57 inline static void SAL_CALL
operator delete (
void *,
void * )
SAL_THROW(())
70 explicit inline Any( T
const & value );
72 explicit inline Any(
bool value );
117 {
return *
reinterpret_cast< const Type *
>( &
pType ); }
157 inline const void * SAL_CALL
getValue() const SAL_THROW(())
160 #if ! defined(EXCEPTIONS_OFF)
174 template <
typename T>
175 inline T
get()
const;
176 #endif // ! defined(EXCEPTIONS_OFF)
203 inline void SAL_CALL
clear() SAL_THROW(());
219 template <typename T>
220 inline
bool has() const;
228 inline
sal_Bool SAL_CALL operator == ( const
Any & rAny ) const SAL_THROW(());
235 inline
sal_Bool SAL_CALL operator != ( const
Any & rAny ) const SAL_THROW(());
239 explicit
Any( sal_uInt16 );
240 #if defined(_MSC_VER)
244 #if ! defined(EXCEPTIONS_OFF)
246 sal_uInt16 get<sal_uInt16>()
const;
247 #endif // ! defined(EXCEPTIONS_OFF)
249 bool has<sal_uInt16>()
const;
250 #endif // defined(_MSC_VER)
279 inline void SAL_CALL
operator <<= ( Any & rAny,
bool const & value )
371 return ::cppu::UnoType< ::com::sun::star::uno::Any >::get();
void getValueTypeDescription(typelib_TypeDescription **ppTypeDescr) const
Gets the type description of the set value.
Definition: Any.h:130
#define SAL_UNUSED_PARAMETER
Annotate unused but required C++ function parameters.
Definition: types.h:540
Full type description of a type.
Definition: typedescription.h:71
SAL_DLLPUBLIC void rtl_freeMemory(void *Ptr) SAL_THROW_EXTERN_C()
Free memory.
void clear()
Clears this any.
Definition: Any.hxx:130
inline::rtl::OUString getValueTypeName() const
Gets the type name of the set value.
Definition: Any.hxx:104
sal_Bool operator>>=(const Any &rAny, C &value)
Template binary >>= operator to assign a value from an any.
Definition: Any.hxx:235
~Any()
Destructor: Destructs any content and frees memory.
Definition: Any.hxx:87
signed char sal_Int8
Definition: types.h:42
type class of void
Definition: typeclass.h:29
sal_Bool hasValue() const
Tests if any contains a value.
Definition: Any.h:150
sal_Bool isExtractableTo(const Type &rType) const
Tests whether this any is extractable to a value of given type.
Definition: Any.hxx:136
void * pData
pointer to value; this may point to pReserved and thus the uno_Any is not anytime mem-copyable! You m...
Definition: any2.h:49
bool has() const
Tests whether this any can provide a value of specified type.
Definition: Any.hxx:145
sal_Bool operator==(const Any &rAny, const C &value)
Template equality operator: compares set value of left side any to right side value.
Definition: Any.hxx:547
CPPU_DLLPUBLIC void typelib_typedescriptionreference_getDescription(typelib_TypeDescription **ppRet, typelib_TypeDescriptionReference *pRef) SAL_THROW_EXTERN_C()
Retrieves the type description for a given reference.
unsigned char sal_Bool
Definition: types.h:37
Any makeAny(const C &value)
Template function to generically construct an any from a C++ value.
Definition: Any.hxx:176
This is the binary specification of an UNO any.
Definition: any2.h:40
struct _typelib_TypeDescriptionReference * pType
type of value
Definition: any2.h:44
const Type & getValueType() const
Gets the type of the set value.
Definition: Any.h:116
SAL_DLLPUBLIC void * rtl_allocateMemory(sal_Size Bytes) SAL_THROW_EXTERN_C()
Allocate memory.
Any & operator=(const Any &rAny)
Assignment operator: Sets the value of the given any.
Definition: Any.hxx:93
const ::com::sun::star::uno::Type & getCppuType(SAL_UNUSED_PARAMETER const ::com::sun::star::uno::Any *)
Gets the meta type of IDL type any.
Definition: Any.h:369
typelib_TypeClass eTypeClass
type class of type
Definition: typedescription.h:52
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:87
Any()
Default constructor: Any holds no value; its type is void.
Definition: Any.hxx:39
void operator<<=(Any &rAny, const C &value)
Template binary <<= operator to set the value of an any.
Definition: Any.hxx:201
TypeClass getValueTypeClass() const
Gets the type class of the set value.
Definition: Any.h:137
void setValue(const void *pData_, const Type &rType)
Sets a value.
Definition: Any.hxx:109
sal_Bool operator!=(const Any &rAny, const C &value)
Template unequality operator: compares set value of left side any to right side value.
Definition: Any.hxx:558
C++ class representing an IDL any.
Definition: Any.h:46
Holds a weak reference to a type description.
Definition: typedescription.h:40
const void * getValue() const
Gets a pointer to the set value.
Definition: Any.h:157
#define SAL_THROW(exc)
Definition of function throw clause macros.
Definition: types.h:356
typelib_TypeDescriptionReference * getValueTypeRef() const
Gets the type of the set value.
Definition: Any.h:122
C++ class representing an IDL meta type.
Definition: Type.h:55