LibreOffice
LibreOffice 5.0 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Any.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef INCLUDED_COM_SUN_STAR_UNO_ANY_HXX
20 #define INCLUDED_COM_SUN_STAR_UNO_ANY_HXX
21 
22 #include <sal/config.h>
23 
24 #include <cassert>
25 #include <iomanip>
26 #include <ostream>
27 
28 #include <com/sun/star/uno/Any.h>
29 #include <uno/data.h>
30 #include <uno/sequence2.h>
34 #include <com/sun/star/uno/RuntimeException.hpp>
35 #include <cppu/cppudllapi.h>
36 #include <cppu/unotype.hxx>
37 
38 extern "C" CPPU_DLLPUBLIC rtl_uString * SAL_CALL cppu_Any_extraction_failure_msg(
39  uno_Any const * pAny, typelib_TypeDescriptionReference * pType )
41 
42 namespace com
43 {
44 namespace sun
45 {
46 namespace star
47 {
48 namespace uno
49 {
50 
51 
52 inline Any::Any()
53 {
55 }
56 
57 
58 template <typename T>
59 inline Any::Any( T const & value )
60 {
62  this, const_cast<T *>(&value),
63  ::cppu::getTypeFavourUnsigned(&value).getTypeLibType(),
65 }
66 
67 inline Any::Any( bool value )
68 {
69  sal_Bool b = value;
71  this, &b, cppu::UnoType<bool>::get().getTypeLibType(),
73 }
74 
75 
76 inline Any::Any( const Any & rAny )
77 {
78  ::uno_type_any_construct( this, rAny.pData, rAny.pType, (uno_AcquireFunc)cpp_acquire );
79 }
80 
81 inline Any::Any( const void * pData_, const Type & rType )
82 {
84  this, const_cast< void * >( pData_ ), rType.getTypeLibType(),
86 }
87 
88 inline Any::Any( const void * pData_, typelib_TypeDescription * pTypeDescr )
89 {
91  this, const_cast< void * >( pData_ ), pTypeDescr, (uno_AcquireFunc)cpp_acquire );
92 }
93 
94 inline Any::Any( const void * pData_, typelib_TypeDescriptionReference * pType_ )
95 {
97  this, const_cast< void * >( pData_ ), pType_, (uno_AcquireFunc)cpp_acquire );
98 }
99 
100 inline Any::~Any()
101 {
103  this, (uno_ReleaseFunc)cpp_release );
104 }
105 
106 inline Any & Any::operator = ( const Any & rAny )
107 {
108  if (this != &rAny)
109  {
111  this, rAny.pData, rAny.pType,
113  }
114  return *this;
115 }
116 
117 inline ::rtl::OUString Any::getValueTypeName() const
118 {
119  return ::rtl::OUString( pType->pTypeName );
120 }
121 
122 inline void Any::setValue( const void * pData_, const Type & rType )
123 {
125  this, const_cast< void * >( pData_ ), rType.getTypeLibType(),
127 }
128 
129 inline void Any::setValue( const void * pData_, typelib_TypeDescriptionReference * pType_ )
130 {
132  this, const_cast< void * >( pData_ ), pType_,
134 }
135 
136 inline void Any::setValue( const void * pData_, typelib_TypeDescription * pTypeDescr )
137 {
139  this, const_cast< void * >( pData_ ), pTypeDescr,
141 }
142 
143 inline void Any::clear()
144 {
146  this, (uno_ReleaseFunc)cpp_release );
147 }
148 
149 inline bool Any::isExtractableTo( const Type & rType ) const
150 {
152  rType.getTypeLibType(), pData, pType,
154 }
155 
156 
157 template <typename T>
158 inline bool Any::has() const
159 {
160  Type const & rType = ::cppu::getTypeFavourUnsigned(static_cast< T * >(0));
162  rType.getTypeLibType(), pData, pType,
165 }
166 
167 inline bool Any::operator == ( const Any & rAny ) const
168 {
170  pData, pType, rAny.pData, rAny.pType,
172 }
173 
174 inline bool Any::operator != ( const Any & rAny ) const
175 {
176  return (! ::uno_type_equalData(
177  pData, pType, rAny.pData, rAny.pType,
179 }
180 
181 
182 template< class C >
183 inline Any SAL_CALL makeAny( const C & value )
184 {
185  return Any( &value, ::cppu::getTypeFavourUnsigned(&value) );
186 }
187 
188 // additionally specialized for C++ bool
189 
190 template<>
191 inline Any SAL_CALL makeAny( bool const & value )
192 {
193  const sal_Bool b = value;
194  return Any( &b, cppu::UnoType<bool>::get() );
195 }
196 
197 
198 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
199 template< class C1, class C2 >
200 inline Any SAL_CALL makeAny( const rtl::OUStringConcat< C1, C2 >& value )
201 {
202  const rtl::OUString str( value );
203  return Any( &str, ::cppu::getTypeFavourUnsigned(&str) );
204 }
205 #endif
206 
207 template<typename T> Any toAny(T const & value) { return makeAny(value); }
208 
209 template<> Any toAny(Any const & value) { return value; }
210 
211 template< class C >
212 inline void SAL_CALL operator <<= ( Any & rAny, const C & value )
213 {
214  const Type & rType = ::cppu::getTypeFavourUnsigned(&value);
216  &rAny, const_cast< C * >( &value ), rType.getTypeLibType(),
218 }
219 
220 // additionally for C++ bool:
221 
222 template<>
223 inline void SAL_CALL operator <<= ( Any & rAny, bool const & value )
224 {
225  sal_Bool b = value;
227  &rAny, &b, cppu::UnoType<bool>::get().getTypeLibType(),
229 }
230 
231 
232 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
233 template< class C1, class C2 >
234 inline void SAL_CALL operator <<= ( Any & rAny, const rtl::OUStringConcat< C1, C2 >& value )
235 {
236  const rtl::OUString str( value );
237  const Type & rType = ::cppu::getTypeFavourUnsigned(&str);
239  &rAny, const_cast< rtl::OUString * >( &str ), rType.getTypeLibType(),
241 }
242 #endif
243 
244 template< class C >
245 inline bool SAL_CALL operator >>= ( const Any & rAny, C & value )
246 {
247  const Type & rType = ::cppu::getTypeFavourUnsigned(&value);
249  &value, rType.getTypeLibType(),
250  rAny.pData, rAny.pType,
253 }
254 
255 // bool
256 
257 template<>
258 inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Bool & value )
259 {
260  if (typelib_TypeClass_BOOLEAN == rAny.pType->eTypeClass)
261  {
262  value = (* static_cast< const sal_Bool * >( rAny.pData ) != sal_False);
263  return true;
264  }
265  return false;
266 }
267 
268 template<>
269 inline bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value )
270 {
271  return (typelib_TypeClass_BOOLEAN == rAny.pType->eTypeClass &&
272  (value != sal_False) == (* static_cast< const sal_Bool * >( rAny.pData ) != sal_False));
273 }
274 
275 
276 template<>
277 inline bool SAL_CALL operator >>= ( Any const & rAny, bool & value )
278 {
279  if (rAny.pType->eTypeClass == typelib_TypeClass_BOOLEAN)
280  {
281  value = *static_cast< sal_Bool const * >(
282  rAny.pData ) != sal_False;
283  return true;
284  }
285  return false;
286 }
287 
288 
289 template<>
290 inline bool SAL_CALL operator == ( Any const & rAny, bool const & value )
291 {
292  return (rAny.pType->eTypeClass == typelib_TypeClass_BOOLEAN &&
293  (value ==
294  (*static_cast< sal_Bool const * >( rAny.pData )
295  != sal_False)));
296 }
297 
298 // byte
299 
300 template<>
301 inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, sal_Int8 & value )
302 {
303  if (typelib_TypeClass_BYTE == rAny.pType->eTypeClass)
304  {
305  value = * static_cast< const sal_Int8 * >( rAny.pData );
306  return true;
307  }
308  return false;
309 }
310 // short
311 
312 template<>
313 inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value )
314 {
315  switch (rAny.pType->eTypeClass)
316  {
318  value = * static_cast< const sal_Int8 * >( rAny.pData );
319  return true;
322  value = * static_cast< const sal_Int16 * >( rAny.pData );
323  return true;
324  default:
325  return false;
326  }
327 }
328 
329 template<>
330 inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value )
331 {
332  switch (rAny.pType->eTypeClass)
333  {
335  value = (sal_uInt16)( * static_cast< const sal_Int8 * >( rAny.pData ) );
336  return true;
339  value = * static_cast< const sal_uInt16 * >( rAny.pData );
340  return true;
341  default:
342  return false;
343  }
344 }
345 // long
346 
347 template<>
348 inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value )
349 {
350  switch (rAny.pType->eTypeClass)
351  {
353  value = * static_cast< const sal_Int8 * >( rAny.pData );
354  return true;
356  value = * static_cast< const sal_Int16 * >( rAny.pData );
357  return true;
359  value = * static_cast< const sal_uInt16 * >( rAny.pData );
360  return true;
363  value = * static_cast< const sal_Int32 * >( rAny.pData );
364  return true;
365  default:
366  return false;
367  }
368 }
369 
370 template<>
371 inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value )
372 {
373  switch (rAny.pType->eTypeClass)
374  {
376  value = (sal_uInt32)( * static_cast< const sal_Int8 * >( rAny.pData ) );
377  return true;
379  value = (sal_uInt32)( * static_cast< const sal_Int16 * >( rAny.pData ) );
380  return true;
382  value = * static_cast< const sal_uInt16 * >( rAny.pData );
383  return true;
386  value = * static_cast< const sal_uInt32 * >( rAny.pData );
387  return true;
388  default:
389  return false;
390  }
391 }
392 // hyper
393 
394 template<>
395 inline bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value )
396 {
397  switch (rAny.pType->eTypeClass)
398  {
400  value = * static_cast< const sal_Int8 * >( rAny.pData );
401  return true;
403  value = * static_cast< const sal_Int16 * >( rAny.pData );
404  return true;
406  value = * static_cast< const sal_uInt16 * >( rAny.pData );
407  return true;
409  value = * static_cast< const sal_Int32 * >( rAny.pData );
410  return true;
412  value = * static_cast< const sal_uInt32 * >( rAny.pData );
413  return true;
416  value = * static_cast< const sal_Int64 * >( rAny.pData );
417  return true;
418  default:
419  return false;
420  }
421 }
422 
423 template<>
424 inline bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value )
425 {
426  switch (rAny.pType->eTypeClass)
427  {
429  value = (sal_uInt64)( * static_cast< const sal_Int8 * >( rAny.pData ) );
430  return true;
432  value = (sal_uInt64)( * static_cast< const sal_Int16 * >( rAny.pData ) );
433  return true;
435  value = * static_cast< const sal_uInt16 * >( rAny.pData );
436  return true;
438  value = (sal_uInt64)( * static_cast< const sal_Int32 * >( rAny.pData ) );
439  return true;
441  value = * static_cast< const sal_uInt32 * >( rAny.pData );
442  return true;
445  value = * static_cast< const sal_uInt64 * >( rAny.pData );
446  return true;
447  default:
448  return false;
449  }
450 }
451 // float
452 
453 template<>
454 inline bool SAL_CALL operator >>= ( const Any & rAny, float & value )
455 {
456  switch (rAny.pType->eTypeClass)
457  {
459  value = * static_cast< const sal_Int8 * >( rAny.pData );
460  return true;
462  value = * static_cast< const sal_Int16 * >( rAny.pData );
463  return true;
465  value = * static_cast< const sal_uInt16 * >( rAny.pData );
466  return true;
468  value = * static_cast< const float * >( rAny.pData );
469  return true;
470  default:
471  return false;
472  }
473 }
474 // double
475 
476 template<>
477 inline bool SAL_CALL operator >>= ( const Any & rAny, double & value )
478 {
479  switch (rAny.pType->eTypeClass)
480  {
482  value = * static_cast< const sal_Int8 * >( rAny.pData );
483  return true;
485  value = * static_cast< const sal_Int16 * >( rAny.pData );
486  return true;
488  value = * static_cast< const sal_uInt16 * >( rAny.pData );
489  return true;
491  value = * static_cast< const sal_Int32 * >( rAny.pData );
492  return true;
494  value = * static_cast< const sal_uInt32 * >( rAny.pData );
495  return true;
497  value = * static_cast< const float * >( rAny.pData );
498  return true;
500  value = * static_cast< const double * >( rAny.pData );
501  return true;
502  default:
503  return false;
504  }
505 }
506 // string
507 
508 template<>
509 inline bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & value )
510 {
511  if (typelib_TypeClass_STRING == rAny.pType->eTypeClass)
512  {
513  value = * static_cast< const ::rtl::OUString * >( rAny.pData );
514  return true;
515  }
516  return false;
517 }
518 
519 template<>
520 inline bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value )
521 {
522  return (typelib_TypeClass_STRING == rAny.pType->eTypeClass &&
523  value.equals( * static_cast< const ::rtl::OUString * >( rAny.pData ) ));
524 }
525 // type
526 
527 template<>
528 inline bool SAL_CALL operator >>= ( const Any & rAny, Type & value )
529 {
530  if (typelib_TypeClass_TYPE == rAny.pType->eTypeClass)
531  {
532  value = * static_cast< const Type * >( rAny.pData );
533  return true;
534  }
535  return false;
536 }
537 
538 template<>
539 inline bool SAL_CALL operator == ( const Any & rAny, const Type & value )
540 {
541  return (typelib_TypeClass_TYPE == rAny.pType->eTypeClass &&
542  value.equals( * static_cast< const Type * >( rAny.pData ) ));
543 }
544 // any
545 
546 template<>
547 inline bool SAL_CALL operator >>= ( const Any & rAny, Any & value )
548 {
549  if (&rAny != &value)
550  {
552  &value, rAny.pData, rAny.pType,
554  }
555  return true;
556 }
557 // interface
558 
559 template<>
560 inline bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value )
561 {
562  if (typelib_TypeClass_INTERFACE == rAny.pType->eTypeClass)
563  {
564  return static_cast< const BaseReference * >( rAny.pData )->operator == ( value );
565  }
566  return false;
567 }
568 
569 // operator to compare to an any.
570 
571 template< class C >
572 inline bool SAL_CALL operator == ( const Any & rAny, const C & value )
573 {
574  const Type & rType = ::cppu::getTypeFavourUnsigned(&value);
576  rAny.pData, rAny.pType,
577  const_cast< C * >( &value ), rType.getTypeLibType(),
579 }
580 // operator to compare to an any. may use specialized operators ==.
581 
582 template< class C >
583 inline bool SAL_CALL operator != ( const Any & rAny, const C & value )
584 {
585  return (! operator == ( rAny, value ));
586 }
587 
588 template <typename T>
589 T Any::get() const
590 {
591  T value = T();
592  if (! (*this >>= value)) {
593  throw RuntimeException(
594  ::rtl::OUString(
596  this,
597  ::cppu::getTypeFavourUnsigned(&value).getTypeLibType() ),
598  SAL_NO_ACQUIRE ) );
599  }
600  return value;
601 }
602 
609 template<typename charT, typename traits>
610 inline std::basic_ostream<charT, traits> &operator<<(std::basic_ostream<charT, traits> &o, Any const &any) {
611  o << "<Any: (" << any.getValueTypeName() << ')';
612  switch(any.pType->eTypeClass) {
614  break;
616  o << ' ' << any.get<bool>();
617  break;
622  o << ' ' << any.get<sal_Int64>();
623  break;
627  o << ' ' << any.get<sal_uInt64>();
628  break;
631  o << ' ' << any.get<double>();
632  break;
633  case typelib_TypeClass_CHAR: {
634  std::ios_base::fmtflags flgs = o.setf(
635  std::ios_base::hex, std::ios_base::basefield);
636  charT fill = o.fill('0');
637  o << " U+" << std::setw(4)
638  << *static_cast<sal_Unicode const *>(any.getValue());
639  o.setf(flgs);
640  o.fill(fill);
641  break;
642  }
644  o << ' ' << any.get<rtl::OUString>();
645  break;
647  o << ' ' << any.get<css::uno::Type>().getTypeName();
648  break;
650  o << " len "
651  << ((*static_cast<uno_Sequence * const *>(any.getValue()))->
652  nElements);
653  break;
655  o << ' ' << *static_cast<sal_Int32 const *>(any.getValue());
656  break;
659  o << ' ' << any.getValue();
660  break;
662  o << ' ' << *static_cast<void * const *>(any.getValue());
663  break;
664  default:
665  assert(false); // this cannot happen
666  break;
667  }
668  o << '>';
669  return o;
670 }
671 
672 }
673 }
674 }
675 }
676 
677 #endif
678 
679 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
type class of string
Definition: typeclass.h:53
type class of long
Definition: typeclass.h:41
bool has() const
Tests whether this any can provide a value of specified type.
Definition: Any.hxx:158
type class of char
Definition: typeclass.h:31
type class of enum
Definition: typeclass.h:59
Any makeAny(const C &value)
Template function to generically construct an any from a C++ value.
Definition: Any.hxx:183
type class of unsigned hyper
Definition: typeclass.h:47
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:583
type class of exception
Definition: typeclass.h:70
struct SAL_DLLPUBLIC_RTTI _uno_Any uno_Any
This is the binary specification of an UNO any.
CPPU_DLLPUBLIC void uno_any_construct(uno_Any *pDest, void *pSource, struct _typelib_TypeDescription *pTypeDescr, uno_AcquireFunc acquire) SAL_THROW_EXTERN_C()
Constructs an any with a given value.
Get the com::sun::star::uno::Type instance representing a certain UNO type.
Definition: unotype.hxx:45
type class of unsigned long
Definition: typeclass.h:43
bool operator!=(const Any &rAny) const
Unequality operator: compares two anys.
Definition: Any.hxx:174
type class of short
Definition: typeclass.h:37
type class of void
Definition: typeclass.h:29
void cpp_acquire(void *pCppI)
Function to acquire a C++ interface.
Definition: genfunc.hxx:37
CPPU_DLLPUBLIC void uno_type_any_construct(uno_Any *pDest, void *pSource, struct _typelib_TypeDescriptionReference *pType, uno_AcquireFunc acquire) SAL_THROW_EXTERN_C()
Constructs an any with a given value.
unsigned char sal_Bool
Definition: types.h:48
type class of double
Definition: typeclass.h:51
void(* uno_ReleaseFunc)(void *pInterface)
Generic function pointer declaration to release an interface.
Definition: data.h:52
~Any()
Destructor: Destructs any content and frees memory.
Definition: Any.hxx:100
type class of float
Definition: typeclass.h:49
type class of interface
Definition: typeclass.h:79
C++ class representing an IDL meta type.
Definition: Type.h:54
void *(* uno_QueryInterfaceFunc)(void *pInterface, struct _typelib_TypeDescriptionReference *pType)
Generic function pointer declaration to query for an interface.
Definition: data.h:40
Any()
Default constructor: Any holds no value; its type is void.
Definition: Any.hxx:52
This is the binary specification of a SAL sequence.
Definition: types.h:339
CPPU_DLLPUBLIC void uno_any_assign(uno_Any *pDest, void *pSource, struct _typelib_TypeDescription *pTypeDescr, uno_AcquireFunc acquire, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Assign an any with a given value.
bool operator==(const Any &rAny) const
Equality operator: compares two anys.
Definition: Any.hxx:167
bool operator>>=(const Any &rAny, C &value)
Template binary >>= operator to assign a value from an any.
Definition: Any.hxx:245
type class of boolean
Definition: typeclass.h:33
definition of a no acquire enum for ctors
Definition: types.h:382
bool equals(const Type &rType) const
Compares two types.
Definition: Type.h:173
CPPU_DLLPUBLIC sal_Bool uno_type_isAssignableFromData(struct _typelib_TypeDescriptionReference *pAssignable, void *pFrom, struct _typelib_TypeDescriptionReference *pFromType, uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Tests whether a value of given type is assignable from given value.
void * cpp_queryInterface(void *pCppI, typelib_TypeDescriptionReference *pType)
Function to query for a C++ interface.
Definition: genfunc.hxx:47
type class of hyper
Definition: typeclass.h:45
type class of sequence
Definition: typeclass.h:72
sal_uInt16 sal_Unicode
Definition: types.h:152
CPPU_DLLPUBLIC void uno_type_any_assign(uno_Any *pDest, void *pSource, struct _typelib_TypeDescriptionReference *pType, uno_AcquireFunc acquire, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Assign an any with a given value.
C++ class representing an IDL any.
Definition: Any.h:49
CPPU_DLLPUBLIC sal_Bool uno_type_assignData(void *pDest, struct _typelib_TypeDescriptionReference *pDestType, void *pSource, struct _typelib_TypeDescriptionReference *pSourceType, uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Assigns a destination value with a source value.
void(* uno_AcquireFunc)(void *pInterface)
Generic function pointer declaration to acquire an interface.
Definition: data.h:46
rtl::OUString getTypeName(rtl::OUString const &rEnvDcp)
Get the OBI type part of an environment descriptor.
Definition: EnvDcp.hxx:38
CPPU_DLLPUBLIC rtl_uString * cppu_Any_extraction_failure_msg(uno_Any const *pAny, typelib_TypeDescriptionReference *pType) SAL_THROW_EXTERN_C()
This base class serves as a base class for all template reference classes and has been introduced due...
Definition: Reference.h:57
signed char sal_Int8
Definition: types.h:53
void setValue(const void *pData_, const Type &rType)
Sets a value.
Definition: Any.hxx:122
Definition: types.h:385
type class of byte
Definition: typeclass.h:35
bool isExtractableTo(const Type &rType) const
Tests whether this any is extractable to a value of given type.
Definition: Any.hxx:149
type class of type
Definition: typeclass.h:55
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:207
void cpp_release(void *pCppI)
Function to release a C++ interface.
Definition: genfunc.hxx:42
void clear()
Clears this any.
Definition: Any.hxx:143
inline::rtl::OUString getValueTypeName() const
Gets the type name of the set value.
Definition: Any.hxx:117
#define sal_False
Definition: types.h:49
type class of struct
Definition: typeclass.h:63
CPPU_DLLPUBLIC void uno_any_clear(uno_Any *pValue, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Sets value to void.
struct SAL_DLLPUBLIC_RTTI _typelib_TypeDescriptionReference typelib_TypeDescriptionReference
Holds a weak reference to a type description.
typelib_TypeDescriptionReference * getTypeLibType() const
Gets the C typelib type description reference pointer.
Definition: Type.h:154
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:115
CPPU_DLLPUBLIC void uno_any_destruct(uno_Any *pValue, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Destructs an any.
#define CPPU_DLLPUBLIC
Definition: cppudllapi.h:10
Any & operator=(const Any &rAny)
Assignment operator: Sets the value of the given any.
Definition: Any.hxx:106
void operator<<=(Any &rAny, const C &value)
Template binary <<= operator to set the value of an any.
Definition: Any.hxx:212
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:572
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:364
CPPU_DLLPUBLIC sal_Bool uno_type_equalData(void *pVal1, struct _typelib_TypeDescriptionReference *pVal1Type, void *pVal2, struct _typelib_TypeDescriptionReference *pVal2Type, uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Tests if two values are equal.
::com::sun::star::uno::Type const & getTypeFavourUnsigned(SAL_UNUSED_PARAMETER T const *)
A working replacement for getCppuType (see there).
Definition: unotype.hxx:302
type class of unsigned short
Definition: typeclass.h:39
T get() const
Provides a value of specified type, so you can easily write e.g.
Definition: Any.hxx:589