LibreOffice Module xmloff (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
comphelper::UnoInterfaceToUniqueIdentifierMapper Class Reference

#include <unointerfacetouniqueidentifiermapper.hxx>

Public Member Functions

 UnoInterfaceToUniqueIdentifierMapper ()
 
const OUString & registerReference (const css::uno::Reference< css::uno::XInterface > &rInterface)
 returns a unique identifier for the given uno object. More...
 
bool registerReference (const OUString &rIdentifier, const css::uno::Reference< css::uno::XInterface > &rInterface)
 registers the given uno object with the given identifier. More...
 
bool reserveIdentifier (const OUString &rIdentifier)
 reserves an identifier for later registration. More...
 
bool registerReservedReference (const OUString &rIdentifier, const css::uno::Reference< css::uno::XInterface > &rInterface)
 registers the given uno object with reserved identifier. More...
 
const OUString & getIdentifier (const css::uno::Reference< css::uno::XInterface > &rInterface) const
 
const css::uno::Reference< css::uno::XInterface > & getReference (const OUString &rIdentifier) const
 

Private Types

typedef std::deque< OUString > Reserved_t
 

Private Member Functions

bool findReference (const css::uno::Reference< css::uno::XInterface > &rInterface, IdMap_t::const_iterator &rIter) const
 
bool findIdentifier (const OUString &rIdentifier, IdMap_t::const_iterator &rIter) const
 
bool findReserved (const OUString &rIdentifier) const
 
bool findReserved (const OUString &rIdentifier, Reserved_t::const_iterator &rIter) const
 

Private Attributes

IdMap_t maEntries
 
sal_uInt32 mnNextId
 
Reserved_t maReserved
 

Detailed Description

Definition at line 37 of file unointerfacetouniqueidentifiermapper.hxx.

Member Typedef Documentation

◆ Reserved_t

typedef std::deque< OUString > comphelper::UnoInterfaceToUniqueIdentifierMapper::Reserved_t
private

Definition at line 39 of file unointerfacetouniqueidentifiermapper.hxx.

Constructor & Destructor Documentation

◆ UnoInterfaceToUniqueIdentifierMapper()

comphelper::UnoInterfaceToUniqueIdentifierMapper::UnoInterfaceToUniqueIdentifierMapper ( )

Definition at line 34 of file unointerfacetouniqueidentifiermapper.cxx.

Member Function Documentation

◆ findIdentifier()

bool comphelper::UnoInterfaceToUniqueIdentifierMapper::findIdentifier ( const OUString &  rIdentifier,
IdMap_t::const_iterator &  rIter 
) const
private

Definition at line 150 of file unointerfacetouniqueidentifiermapper.cxx.

References maEntries.

Referenced by getReference().

◆ findReference()

bool comphelper::UnoInterfaceToUniqueIdentifierMapper::findReference ( const css::uno::Reference< css::uno::XInterface > &  rInterface,
IdMap_t::const_iterator &  rIter 
) const
private

Definition at line 134 of file unointerfacetouniqueidentifiermapper.cxx.

References maEntries.

Referenced by getIdentifier().

◆ findReserved() [1/2]

bool comphelper::UnoInterfaceToUniqueIdentifierMapper::findReserved ( const OUString &  rIdentifier) const
private

◆ findReserved() [2/2]

bool comphelper::UnoInterfaceToUniqueIdentifierMapper::findReserved ( const OUString &  rIdentifier,
Reserved_t::const_iterator &  rIter 
) const
private

Definition at line 186 of file unointerfacetouniqueidentifiermapper.cxx.

References maReserved.

◆ getIdentifier()

const OUString & comphelper::UnoInterfaceToUniqueIdentifierMapper::getIdentifier ( const css::uno::Reference< css::uno::XInterface > &  rInterface) const
Returns
the identifier for the given uno object. If this uno object is not already registered, an empty string is returned

Definition at line 106 of file unointerfacetouniqueidentifiermapper.cxx.

References findReference().

Referenced by XMLAnimationsExporter::exportAnimations(), SdXMLExport::ExportContent_(), XMLTextParagraphExport::exportParagraph(), XMLShapeExport::exportShape(), and XMLShapeExport::ImpExportConnectorShape().

◆ getReference()

const Reference< XInterface > & comphelper::UnoInterfaceToUniqueIdentifierMapper::getReference ( const OUString &  rIdentifier) const
Returns
the uno object that is registered with the given identifier. If no uno object is registered with the given identifier, an empty reference is returned.

Definition at line 120 of file unointerfacetouniqueidentifiermapper.cxx.

References findIdentifier().

Referenced by SdXMLGenericPageContext::SetNavigationOrder().

◆ registerReference() [1/2]

const OUString & comphelper::UnoInterfaceToUniqueIdentifierMapper::registerReference ( const css::uno::Reference< css::uno::XInterface > &  rInterface)

returns a unique identifier for the given uno object.

If a UNO object is registered more than once, the returned identifier is always the same.

Referenced by XMLAnimationsExporter::collect(), XMLShapeExport::collectShapeAutoStyles(), and registerReservedReference().

◆ registerReference() [2/2]

bool comphelper::UnoInterfaceToUniqueIdentifierMapper::registerReference ( const OUString &  rIdentifier,
const css::uno::Reference< css::uno::XInterface > &  rInterface 
)

registers the given uno object with the given identifier.

Returns
false, if the given identifier already exists and is not associated with the given interface

References getIdentifier().

◆ registerReservedReference()

bool comphelper::UnoInterfaceToUniqueIdentifierMapper::registerReservedReference ( const OUString &  rIdentifier,
const css::uno::Reference< css::uno::XInterface > &  rInterface 
)

registers the given uno object with reserved identifier.

Definition at line 165 of file unointerfacetouniqueidentifiermapper.cxx.

References findReserved(), maReserved, and registerReference().

◆ reserveIdentifier()

bool comphelper::UnoInterfaceToUniqueIdentifierMapper::reserveIdentifier ( const OUString &  rIdentifier)

reserves an identifier for later registration.

Returns
false, if the identifier already exists

Definition at line 156 of file unointerfacetouniqueidentifiermapper.cxx.

References findReserved(), and maReserved.

Member Data Documentation

◆ maEntries

IdMap_t comphelper::UnoInterfaceToUniqueIdentifierMapper::maEntries
private

Definition at line 85 of file unointerfacetouniqueidentifiermapper.hxx.

Referenced by findIdentifier(), and findReference().

◆ maReserved

Reserved_t comphelper::UnoInterfaceToUniqueIdentifierMapper::maReserved
private

◆ mnNextId

sal_uInt32 comphelper::UnoInterfaceToUniqueIdentifierMapper::mnNextId
private

Definition at line 86 of file unointerfacetouniqueidentifiermapper.hxx.


The documentation for this class was generated from the following files: