19 #ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
20 #define _COM_SUN_STAR_UNO_REFERENCE_H_
34 class RuntimeException;
67 inline static XInterface * SAL_CALL
iquery( XInterface * pInterface,
const Type & rType )
69 #ifndef EXCEPTIONS_OFF
77 inline static XInterface * SAL_CALL
iquery_throw( XInterface * pInterface,
const Type & rType )
86 inline XInterface * SAL_CALL
get()
const SAL_THROW(())
142 #ifndef EXCEPTIONS_OFF
177 template<
typename T1,
typename T2 >
struct UpCast {
179 template<
bool,
typename U1,
typename >
struct C
182 template<
typename U1,
typename U2 >
struct C< false, U1, U2 >
185 struct S {
char c[2]; };
188 static char f(T2 *,
long);
189 static S f(T1 *
const &,
int);
191 template<
typename U >
static char f(T2 *, U);
192 static S f(T1 *,
int);
198 operator T1 *
const & ()
const;
200 operator T1 * ()
const;
206 typedef typename C< sizeof (f(H(), 0)) == 1, void *, void >::t t;
209 template<
typename T2 >
struct UpCast< XInterface, T2 > {};
218 template<
class interface_type >
226 inline static XInterface * SAL_CALL iquery( XInterface * pInterface )
228 #ifndef EXCEPTIONS_OFF
235 inline static XInterface * SAL_CALL iquery_throw( XInterface * pInterface )
242 inline static interface_type * SAL_CALL iset_throw( interface_type * pInterface )
257 static inline interface_type * castFromXInterface(XInterface * p) {
258 return static_cast< interface_type *
>(
static_cast< void *
>(p));
272 static inline XInterface * castToXInterface(interface_type * p) {
273 return static_cast< XInterface *
>(
static_cast< void *
>(p));
279 inline static void * SAL_CALL
operator new ( ::size_t nSize )
SAL_THROW(())
281 inline static void SAL_CALL
operator delete (
void * pMem )
SAL_THROW(())
283 inline static void * SAL_CALL
operator new ( ::size_t,
void * pMem )
SAL_THROW(())
285 inline static void SAL_CALL
operator delete (
void *,
void * )
SAL_THROW(())
311 template<
class derived_type >
314 typename detail::UpCast< interface_type, derived_type >::t = 0 )
356 #ifndef EXCEPTIONS_OFF
412 inline interface_type * SAL_CALL
operator -> () const SAL_THROW(())
419 inline interface_type * SAL_CALL
get()
const SAL_THROW(())
424 inline void SAL_CALL
clear() SAL_THROW(());
437 inline
sal_Bool SAL_CALL
set( interface_type * pInterface ) SAL_THROW(());
486 #ifndef EXCEPTIONS_OFF
571 template <
typename T>
572 inline T * get_pointer( Reference<T>
const& r )