Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: uno ::

template< typename interface_type >

class Reference


Base Classes
BaseReference (public)
  |  
  +--Reference
Known Derived Classes
None.

virtual abstract interface template
NO NO NO YES
Description
Template reference class for interface type derived from BaseReference. A special constructor given the UNO_QUERY or UNO_REF_QUERY identifier queries interfaces for reference type.
File
Reference.h

Public Members

Methods


~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 ) throw( );
Constructor: Sets given interface pointer without acquiring it.

Reference( interface_type * pInterface, UnoReference_NoAcquire ) throw( );
Constructor: Sets given interface pointer without acquiring it. Deprecated, please use SAL_NO_ACQUIRE version.

Reference( const BaseReference & rRef, UnoReference_Query ) throw( RuntimeException );
Constructor: Queries given interface for reference interface type (interface_type).

Reference( XInterface * pInterface, UnoReference_Query ) throw( RuntimeException );
Constructor: Queries given interface for reference interface type (interface_type).

Reference( const Any & rAny, UnoReference_Query ) throw( RuntimeException );
Constructor: Queries given any for reference interface type (interface_type).

Reference( const BaseReference & rRef, UnoReference_QueryThrow ) throw( RuntimeException );
Constructor: Queries given interface for reference interface type (interface_type). Throws a RuntimeException if the demanded interface cannot be queried.

Reference( XInterface * pInterface, UnoReference_QueryThrow ) throw( RuntimeException );
Constructor: Queries given interface for reference interface type (interface_type). Throws a RuntimeException if the demanded interface cannot be queried.

Reference( const Any & rAny, UnoReference_QueryThrow ) throw( RuntimeException );
Constructor: Queries given any for reference interface type (interface_type). Throws a RuntimeException if the demanded interface cannot be queried.

Reference( const Reference< interface_type > & rRef, UnoReference_SetThrow ) throw( RuntimeException );
Constructor: assigns from the given interface of the same type. Throws a RuntimeException if the source interface is <NULL/>.

Reference( interface_type * pInterface, UnoReference_SetThrow ) throw( RuntimeException );
Constructor: assigns from the given interface of the same type. Throws a RuntimeException if the source interface is <NULL/>.

operator const Reference< XInterface > &( ) const throw( );
interface_type *
operator->( ) const throw( );
Dereference operator: Used to call interface methods.
interface_type *
get( ) const throw( );
Gets interface pointer. This call does not acquire the interface.
void
clear( ) throw( );
Clears reference, i.e. releases interface. Reference is null after clear() call.
sal_Bool
set( const Reference< interface_type > & rRef ) throw( );
Sets the given interface. An interface already set will be released.
sal_Bool
set( interface_type * pInterface ) throw( );
Sets the given interface. An interface already set will be released.
sal_Bool
set( interface_type * pInterface, __sal_NoAcquire ) throw( );
Sets interface pointer without acquiring it. An interface already set will be released.
sal_Bool
set( interface_type * pInterface, UnoReference_NoAcquire ) throw( );
Sets interface pointer without acquiring it. An interface already set will be released. Deprecated, please use SAL_NO_ACQUIRE version.
sal_Bool
set( XInterface * pInterface, UnoReference_Query ) throw( RuntimeException );
Queries given interface for reference interface type (interface_type) and sets it. An interface already set will be released.
sal_Bool
set( const BaseReference & rRef, UnoReference_Query ) throw( RuntimeException );
Queries given interface for reference interface type (interface_type) and sets it. An interface already set will be released.
bool
set( const Any & rAny, UnoReference_Query );
Queries given any for reference interface type (interface_type) and sets it. An interface already set will be released.
void
set( XInterface * pInterface, UnoReference_QueryThrow ) throw( RuntimeException );
void
set( const BaseReference & rRef, UnoReference_QueryThrow ) throw( RuntimeException );
void
set( const Any & rAny, UnoReference_QueryThrow );
void
set( interface_type * pInterface, UnoReference_SetThrow ) throw( RuntimeException );
void
set( const Reference< interface_type > & rRef, UnoReference_SetThrow ) throw( RuntimeException );
Reference< interface_type > &
operator=( interface_type * pInterface ) throw( );
Assignment operator: Acquires given interface pointer and sets reference. An interface already set will be released.
Reference< interface_type > &
operator=( const Reference< interface_type > & rRef ) throw( );
Assignment operator: Acquires given interface reference and sets reference. An interface already set will be released.

Static Methods

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.

Private Members

Static Methods

static XInterface *
iquery( XInterface * pInterface ) throw( RuntimeException );
Queries given interface for type interface_type.
static XInterface *
iquery_throw( XInterface * pInterface ) throw( RuntimeException );
Queries given interface for type interface_type. Throws a RuntimeException if the demanded interface cannot be queried.
static interface_type *
iset_throw( interface_type * pInterface ) throw( RuntimeException );
Returns the given interface if it is not <NULL/>, throws a RuntimeException otherwise.
static interface_type *
castFromXInterface( XInterface * p );
Cast from an "interface pointer" (e.g., BaseReference::_pInterface) to a pointer to this interface_type.
static XInterface *
castToXInterface( interface_type * p );
Cast from a pointer to this interface_type to an "interface pointer" (e.g., BaseReference::_pInterface).

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.