UDK 3.2.7 C/C++ API Reference
Public Member Functions | Static Public Member Functions
com::sun::star::uno::Reference< interface_type > Class Template Reference

Template reference class for interface type derived from BaseReference. More...

#include <Reference.h>

Inheritance diagram for com::sun::star::uno::Reference< interface_type >:
com::sun::star::uno::BaseReference

List of all members.

Public Member Functions

 ~Reference () throw ()
 Destructor: Releases interface if set.
 Reference () throw ()
 Default Constructor: Sets null reference.
 Reference (const Reference< interface_type > &rRef) throw ()
 Copy constructor: Copies interface reference.
 Reference (interface_type *pInterface) throw ()
 Constructor: Sets given interface pointer.
 Reference (interface_type *pInterface, __sal_NoAcquire dummy) throw ()
 Constructor: Sets given interface pointer without acquiring it.
 Reference (interface_type *pInterface, UnoReference_NoAcquire dummy) throw ()
 Constructor: Sets given interface pointer without acquiring it.
 Reference (const BaseReference &rRef, UnoReference_Query dummy) throw (RuntimeException)
 Constructor: Queries given interface for reference interface type (interface_type).
 Reference (XInterface *pInterface, UnoReference_Query dummy) throw (RuntimeException)
 Constructor: Queries given interface for reference interface type (interface_type).
 Reference (const Any &rAny, UnoReference_Query dummy) throw (RuntimeException)
 Constructor: Queries given any for reference interface type (interface_type).
 Reference (const BaseReference &rRef, UnoReference_QueryThrow dummy) throw (RuntimeException)
 Constructor: Queries given interface for reference interface type (interface_type).
 Reference (XInterface *pInterface, UnoReference_QueryThrow dummy) throw (RuntimeException)
 Constructor: Queries given interface for reference interface type (interface_type).
 Reference (const Any &rAny, UnoReference_QueryThrow dummy) throw (RuntimeException)
 Constructor: Queries given any for reference interface type (interface_type).
 Reference (const Reference< interface_type > &rRef, UnoReference_SetThrow dummy) throw (RuntimeException)
 Constructor: assigns from the given interface of the same type.
 Reference (interface_type *pInterface, UnoReference_SetThrow dummy) throw (RuntimeException)
 Constructor: assigns from the given interface of the same type.
 operator const Reference< XInterface > & () const throw ()
 Cast operator to Reference< XInterface >: Reference objects are binary compatible and any interface must be derived from com.sun.star.uno.XInterface.
interface_type * operator-> () const throw ()
 Dereference operator: Used to call interface methods.
interface_type * get () const throw ()
 Gets interface pointer.
void clear () throw ()
 Clears reference, i.e.
sal_Bool set (const Reference< interface_type > &rRef) throw ()
 Sets the given interface.
sal_Bool set (interface_type *pInterface) throw ()
 Sets the given interface.
sal_Bool set (interface_type *pInterface, __sal_NoAcquire dummy) throw ()
 Sets interface pointer without acquiring it.
sal_Bool set (interface_type *pInterface, UnoReference_NoAcquire dummy) throw ()
 Sets interface pointer without acquiring it.
sal_Bool set (XInterface *pInterface, UnoReference_Query dummy) throw (RuntimeException)
 Queries given interface for reference interface type (interface_type) and sets it.
sal_Bool set (const BaseReference &rRef, UnoReference_Query dummy) throw (RuntimeException)
 Queries given interface for reference interface type (interface_type) and sets it.
bool set (Any const &rAny, UnoReference_Query dummy)
 Queries given any for reference interface type (interface_type) and sets it.
void set (XInterface *pInterface, UnoReference_QueryThrow dummy) throw (RuntimeException)
 Queries given interface for reference interface type (interface_type) and sets it.
void set (const BaseReference &rRef, UnoReference_QueryThrow dummy) throw (RuntimeException)
 Queries given interface for reference interface type (interface_type) and sets it.
void set (Any const &rAny, UnoReference_QueryThrow dummy)
 Queries given any for reference interface type (interface_type) and sets it.
void set (interface_type *pInterface, UnoReference_SetThrow dummy) throw (RuntimeException)
 sets the given interface An interface already set will be released.
void set (const Reference< interface_type > &rRef, UnoReference_SetThrow dummy) throw (RuntimeException)
 sets the given interface An interface already set will be released.
Reference< interface_type > & operator= (interface_type *pInterface) throw ()
 Assignment operator: Acquires given interface pointer and sets reference.
Reference< interface_type > & operator= (const Reference< interface_type > &rRef) throw ()
 Assignment operator: Acquires given interface reference and sets reference.

Static Public Member Functions

static Reference< interface_type > query (const BaseReference &rRef) throw (RuntimeException)
 Queries given interface reference for type interface_type.
static Reference< interface_type > query (XInterface *pInterface) throw (RuntimeException)
 Queries given interface for type interface_type.

Detailed Description

template<class interface_type>
class com::sun::star::uno::Reference< interface_type >

Template reference class for interface type derived from BaseReference.

A special constructor given the UNO_QUERY identifier queries interfaces for reference type.


Constructor & Destructor Documentation

template<class interface_type >
com::sun::star::uno::Reference< interface_type >::~Reference ( ) throw () [inline]

Destructor: Releases interface if set.

template<class interface_type >
com::sun::star::uno::Reference< interface_type >::Reference ( ) throw () [inline]

Default Constructor: Sets null reference.

template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( const Reference< interface_type > &  rRef) throw () [inline]

Copy constructor: Copies interface reference.

Parameters:
rRefanother reference
template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( interface_type *  pInterface) throw () [inline]

Constructor: Sets given interface pointer.

Parameters:
pInterfacean interface pointer
template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( interface_type *  pInterface,
__sal_NoAcquire  dummy 
) throw () [inline]

Constructor: Sets given interface pointer without acquiring it.

Parameters:
pInterfaceanother reference
dummySAL_NO_ACQUIRE to force obvious distinction to other constructors
template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( interface_type *  pInterface,
UnoReference_NoAcquire  dummy 
) throw () [inline]

Constructor: Sets given interface pointer without acquiring it.

Deprecated, please use SAL_NO_ACQUIRE version.

Deprecated:
Parameters:
pInterfaceanother reference
dummyUNO_REF_NO_ACQUIRE to force obvious distinction to other constructors
template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( const BaseReference< interface_type > &  rRef,
UnoReference_Query  dummy 
) throw (RuntimeException) [inline]

Constructor: Queries given interface for reference interface type (interface_type).

Parameters:
rRefanother reference
dummyUNO_QUERY to force obvious distinction to other constructors
template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( XInterface *  pInterface,
UnoReference_Query  dummy 
) throw (RuntimeException) [inline]

Constructor: Queries given interface for reference interface type (interface_type).

Parameters:
pInterfacean interface pointer
dummyUNO_QUERY to force obvious distinction to other constructors
template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( const Any rAny,
UnoReference_Query  dummy 
) throw (RuntimeException) [inline]

Constructor: Queries given any for reference interface type (interface_type).

Parameters:
rAnyan any
dummyUNO_QUERY to force obvious distinction to other constructors
template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( const BaseReference< interface_type > &  rRef,
UnoReference_QueryThrow  dummy 
) throw (RuntimeException) [inline]

Constructor: Queries given interface for reference interface type (interface_type).

Throws a RuntimeException if the demanded interface cannot be queried.

Parameters:
rRefanother reference
dummyUNO_QUERY_THROW to force obvious distinction to other constructors
template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( XInterface *  pInterface,
UnoReference_QueryThrow  dummy 
) throw (RuntimeException) [inline]

Constructor: Queries given interface for reference interface type (interface_type).

Throws a RuntimeException if the demanded interface cannot be queried.

Parameters:
pInterfacean interface pointer
dummyUNO_QUERY_THROW to force obvious distinction to other constructors
template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( const Any rAny,
UnoReference_QueryThrow  dummy 
) throw (RuntimeException) [inline]

Constructor: Queries given any for reference interface type (interface_type).

Throws a RuntimeException if the demanded interface cannot be queried.

Parameters:
rAnyan any
dummyUNO_QUERY_THROW to force obvious distinction to other constructors
template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( const Reference< interface_type > &  rRef,
UnoReference_SetThrow  dummy 
) throw (RuntimeException) [inline]

Constructor: assigns from the given interface of the same type.

Throws a RuntimeException if the source interface is NULL.

Parameters:
rRefanother interface reference of the same type
dummyUNO_SET_THROW to distinguish from default copy constructor
Since:
UDK 3.2.8
template<class interface_type>
com::sun::star::uno::Reference< interface_type >::Reference ( interface_type *  pInterface,
UnoReference_SetThrow  dummy 
) throw (RuntimeException) [inline]

Constructor: assigns from the given interface of the same type.

Throws a RuntimeException if the source interface is NULL.

Parameters:
pInterfacean interface pointer
dummyUNO_SET_THROW to distinguish from default assignment constructor
Since:
UDK 3.2.8

Member Function Documentation

template<class interface_type >
void com::sun::star::uno::Reference< interface_type >::clear ( ) throw () [inline]

Clears reference, i.e.

releases interface. Reference is null after clear() call.

template<class interface_type>
interface_type* com::sun::star::uno::Reference< interface_type >::get ( ) const throw () [inline]

Gets interface pointer.

This call does not acquire the interface.

Returns:
UNacquired interface pointer

Reimplemented from com::sun::star::uno::BaseReference.

template<class interface_type>
com::sun::star::uno::Reference< interface_type >::operator const Reference< XInterface > & ( ) const throw () [inline]

Cast operator to Reference< XInterface >: Reference objects are binary compatible and any interface must be derived from com.sun.star.uno.XInterface.

This a useful direct cast possibility.

template<class interface_type>
interface_type* com::sun::star::uno::Reference< interface_type >::operator-> ( ) const throw () [inline]

Dereference operator: Used to call interface methods.

Returns:
UNacquired interface pointer
template<class interface_type>
Reference< interface_type > & com::sun::star::uno::Reference< interface_type >::operator= ( interface_type *  pInterface) throw () [inline]

Assignment operator: Acquires given interface pointer and sets reference.

An interface already set will be released.

Parameters:
pInterfacean interface pointer
Returns:
this reference
template<class interface_type>
Reference< interface_type > & com::sun::star::uno::Reference< interface_type >::operator= ( const Reference< interface_type > &  rRef) throw () [inline]

Assignment operator: Acquires given interface reference and sets reference.

An interface already set will be released.

Parameters:
rRefan interface reference
Returns:
this reference
template<class interface_type >
Reference< interface_type > com::sun::star::uno::Reference< interface_type >::query ( XInterface *  pInterface) throw (RuntimeException) [inline, static]

Queries given interface for type interface_type.

Parameters:
pInterfaceinterface pointer
Returns:
interface reference of demanded type (may be null)
template<class interface_type >
Reference< interface_type > com::sun::star::uno::Reference< interface_type >::query ( const BaseReference< interface_type > &  rRef) throw (RuntimeException) [inline, static]

Queries given interface reference for type interface_type.

Parameters:
rRefinterface reference
Returns:
interface reference of demanded type (may be null)
template<class interface_type>
void com::sun::star::uno::Reference< interface_type >::set ( const BaseReference< interface_type > &  rRef,
UnoReference_QueryThrow  dummy 
) throw (RuntimeException) [inline]

Queries given interface for reference interface type (interface_type) and sets it.

An interface already set will be released. Throws a RuntimeException if the demanded interface cannot be set.

Parameters:
rRefanother reference
dummyUNO_QUERY_THROW to force obvious distinction to set methods
template<class interface_type>
void com::sun::star::uno::Reference< interface_type >::set ( XInterface *  pInterface,
UnoReference_QueryThrow  dummy 
) throw (RuntimeException) [inline]

Queries given interface for reference interface type (interface_type) and sets it.

An interface already set will be released. Throws a RuntimeException if the demanded interface cannot be set.

Parameters:
pInterfacean interface pointer
dummyUNO_QUERY_THROW to force obvious distinction to set methods
template<class interface_type>
bool com::sun::star::uno::Reference< interface_type >::set ( Any const &  rAny,
UnoReference_Query  dummy 
) [inline]

Queries given any for reference interface type (interface_type) and sets it.

An interface already set will be released.

Parameters:
rAnyan Any containing an interface
dummyUNO_QUERY to force obvious distinction to set methods
Returns:
true, if non-null interface was set
template<class interface_type>
sal_Bool com::sun::star::uno::Reference< interface_type >::set ( const Reference< interface_type > &  rRef) throw () [inline]

Sets the given interface.

An interface already set will be released.

Parameters:
rRefanother reference
Returns:
true, if non-null interface was set
template<class interface_type>
sal_Bool com::sun::star::uno::Reference< interface_type >::set ( XInterface *  pInterface,
UnoReference_Query  dummy 
) throw (RuntimeException) [inline]

Queries given interface for reference interface type (interface_type) and sets it.

An interface already set will be released.

Parameters:
pInterfacean interface pointer
dummyUNO_QUERY to force obvious distinction to set methods
Returns:
true, if non-null interface was set
template<class interface_type>
sal_Bool com::sun::star::uno::Reference< interface_type >::set ( const BaseReference< interface_type > &  rRef,
UnoReference_Query  dummy 
) throw (RuntimeException) [inline]

Queries given interface for reference interface type (interface_type) and sets it.

An interface already set will be released.

Parameters:
rRefanother reference
dummyUNO_QUERY to force obvious distinction to set methods
Returns:
true, if non-null interface was set
template<class interface_type>
sal_Bool com::sun::star::uno::Reference< interface_type >::set ( interface_type *  pInterface,
__sal_NoAcquire  dummy 
) throw () [inline]

Sets interface pointer without acquiring it.

An interface already set will be released.

Parameters:
pInterfacean interface pointer
dummySAL_NO_ACQUIRE to force obvious distinction to set methods
Returns:
true, if non-null interface was set
template<class interface_type>
sal_Bool com::sun::star::uno::Reference< interface_type >::set ( interface_type *  pInterface) throw () [inline]

Sets the given interface.

An interface already set will be released.

Parameters:
pInterfaceanother interface
Returns:
true, if non-null interface was set
template<class interface_type>
void com::sun::star::uno::Reference< interface_type >::set ( const Reference< interface_type > &  rRef,
UnoReference_SetThrow  dummy 
) throw (RuntimeException) [inline]

sets the given interface An interface already set will be released.

Throws a RuntimeException if the source interface is <NULL>.

Parameters:
rRefan interface reference
dummyUNO_SET_THROW to force obvious distinction to other set methods
Since:
UDK 3.2.8
template<class interface_type>
sal_Bool com::sun::star::uno::Reference< interface_type >::set ( interface_type *  pInterface,
UnoReference_NoAcquire  dummy 
) throw () [inline]

Sets interface pointer without acquiring it.

An interface already set will be released. Deprecated, please use SAL_NO_ACQUIRE version.

Deprecated:
Parameters:
pInterfacean interface pointer
dummyUNO_REF_NO_ACQUIRE to force obvious distinction to set methods
Returns:
true, if non-null interface was set
template<class interface_type>
void com::sun::star::uno::Reference< interface_type >::set ( Any const &  rAny,
UnoReference_QueryThrow  dummy 
) [inline]

Queries given any for reference interface type (interface_type) and sets it.

An interface already set will be released. Throws a RuntimeException if the demanded interface cannot be set.

Parameters:
rAnyan Any containing an interface
dummyUNO_QUERY_THROW to force obvious distinction to set methods
template<class interface_type>
void com::sun::star::uno::Reference< interface_type >::set ( interface_type *  pInterface,
UnoReference_SetThrow  dummy 
) throw (RuntimeException) [inline]

sets the given interface An interface already set will be released.

Throws a RuntimeException if the source interface is <NULL>.

Parameters:
pInterfacean interface pointer
dummyUNO_SET_THROW to force obvious distinction to other set methods
Since:
UDK 3.2.8

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines