19 #ifndef INCLUDED_COM_SUN_STAR_UNO_ANY_H
20 #define INCLUDED_COM_SUN_STAR_UNO_ANY_H
25 #include <com/sun/star/uno/TypeClass.hdl>
28 namespace rtl {
class OUString; }
54 inline static void * SAL_CALL
operator new (
size_t nSize )
56 inline static void SAL_CALL
operator delete (
void * pMem )
58 inline static void * SAL_CALL
operator new ( size_t,
void * pMem )
60 inline static void SAL_CALL
operator delete (
void *,
void * )
73 explicit inline Any( T
const & value );
75 explicit inline Any(
bool value );
81 inline Any(
const Any & rAny );
88 inline Any(
const void * pData_,
const Type & rType );
113 inline Any & SAL_CALL operator = (
const Any & rAny );
120 {
return *
reinterpret_cast< const Type *
>( &pType ); }
141 {
return (TypeClass)pType->eTypeClass; }
147 inline ::rtl::OUString SAL_CALL getValueTypeName()
const;
175 template <
typename T>
176 inline T
get()
const;
184 inline void SAL_CALL setValue(
const void * pData_,
const Type & rType );
203 inline void SAL_CALL clear();
211 inline bool SAL_CALL isExtractableTo(
const Type & rType )
const;
219 template <
typename T>
220 inline bool has()
const;
246 template<> sal_uInt16
Any::get<sal_uInt16>() const SAL_DELETED_FUNCTION;
247 template<>
bool Any::has<sal_uInt16>() const SAL_DELETED_FUNCTION;
257 inline
Any SAL_CALL
makeAny( const C & value );
261 inline
Any SAL_CALL
makeAny(
bool const & value );
263 template<>
Any SAL_CALL
makeAny(
Any const &) SAL_DELETED_FUNCTION;
272 template<typename T> inline
Any toAny(T const & value);
285 inline
void SAL_CALL operator <<= (
Any & rAny, const C & value );
289 inline
void SAL_CALL operator <<= (
Any & rAny,
bool const & value );
301 inline
bool SAL_CALL operator >>= ( const
Any & rAny, C & value );
314 inline
bool SAL_CALL operator == ( const
Any & rAny, const C & value );
326 inline
bool SAL_CALL operator != ( const
Any & rAny, const C & value );
331 inline
bool SAL_CALL operator >>= ( const
Any & rAny,
sal_Bool & value );
333 inline
bool SAL_CALL operator == ( const
Any & rAny, const
sal_Bool & value );
335 inline
bool SAL_CALL operator >>= (
Any const & rAny,
bool & value );
337 inline
bool SAL_CALL operator == (
Any const & rAny,
bool const & value );
340 inline
bool SAL_CALL operator >>= ( const
Any & rAny,
sal_Int8 & value );
343 inline
bool SAL_CALL operator >>= ( const
Any & rAny, sal_Int16 & value );
345 inline
bool SAL_CALL operator >>= ( const
Any & rAny, sal_uInt16 & value );
348 inline
bool SAL_CALL operator >>= ( const
Any & rAny, sal_Int32 & value );
350 inline
bool SAL_CALL operator >>= ( const
Any & rAny, sal_uInt32 & value );
353 inline
bool SAL_CALL operator >>= ( const
Any & rAny, sal_Int64 & value );
355 inline
bool SAL_CALL operator >>= ( const
Any & rAny, sal_uInt64 & value );
358 inline
bool SAL_CALL operator >>= ( const
Any & rAny,
float & value );
361 inline
bool SAL_CALL operator >>= ( const
Any & rAny,
double & value );
364 inline
bool SAL_CALL operator >>= ( const
Any & rAny, ::
rtl::OUString & value );
366 inline
bool SAL_CALL operator == ( const
Any & rAny, const ::
rtl::OUString & value );
369 inline
bool SAL_CALL operator >>= ( const
Any & rAny,
Type & value );
371 inline
bool SAL_CALL operator == ( const
Any & rAny, const
Type & value );
374 inline
bool SAL_CALL operator >>= ( const
Any & rAny,
Any & value );
377 inline
bool SAL_CALL operator == ( const
Any & rAny, const BaseReference & value );
399 return ::cppu::UnoType< ::com::sun::star::uno::Any >::get();
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:397
Any makeAny(const C &value)
Template function to generically construct an any from a C++ value.
Definition: Any.hxx:184
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:584
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:408
const void * getValue() const
Gets a pointer to the set value.
Definition: Any.h:160
SAL_DLLPUBLIC void rtl_freeMemory(void *Ptr) SAL_THROW_EXTERN_C()
Free memory.
struct SAL_DLLPUBLIC_RTTI _uno_Any uno_Any
This is the binary specification of an UNO any.
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:612
CPPU_DLLPUBLIC void typelib_typedescriptionreference_getDescription(typelib_TypeDescription **ppRet, typelib_TypeDescriptionReference *pRef) SAL_THROW_EXTERN_C()
Retrieves the type description for a given reference.
void getValueTypeDescription(typelib_TypeDescription **ppTypeDescr) const
Gets the type description of the set value.
Definition: Any.h:133
type class of void
Definition: typeclass.h:29
unsigned char sal_Bool
Definition: types.h:48
C++ class representing an IDL meta type.
Definition: Type.h:54
TypeClass getValueTypeClass() const
Gets the type class of the set value.
Definition: Any.h:140
SAL_DLLPUBLIC void * rtl_allocateMemory(sal_Size Bytes) SAL_THROW_EXTERN_C()
Allocate memory.
bool hasValue() const
Tests if any contains a value.
Definition: Any.h:153
C++ class representing an IDL any.
Definition: Any.h:49
#define SAL_UNUSED_PARAMETER
Annotate unused but required C++ function parameters.
Definition: types.h:591
This base class serves as a base class for all template reference classes and has been introduced due...
Definition: Reference.h:58
signed char sal_Int8
Definition: types.h:53
typelib_TypeDescriptionReference * getValueTypeRef() const
Gets the type of the set value.
Definition: Any.h:125
#define SAL_DEPRECATED(message)
Use as follows: SAL_DEPRECATED("Dont use, its evil.") void doit(int nPara);.
Definition: types.h:499
struct SAL_DLLPUBLIC_RTTI _typelib_TypeDescription typelib_TypeDescription
Full type description of a type.
Any toAny(T const &value)
Wrap a value in an Any, if necessary.
Definition: Any.hxx:208
const Type & getValueType() const
Gets the type of the set value.
Definition: Any.h:119
struct SAL_DLLPUBLIC_RTTI _typelib_TypeDescriptionReference typelib_TypeDescriptionReference
Holds a weak reference to a type description.
Definition: bootstrap.hxx:29
Definition: Enterable.hxx:26
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:573