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

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

Definition at line 39 of file unointerfacetouniqueidentifiermapper.hxx.

Constructor & Destructor Documentation

comphelper::UnoInterfaceToUniqueIdentifierMapper::UnoInterfaceToUniqueIdentifierMapper ( )

Definition at line 33 of file unointerfacetouniqueidentifiermapper.cxx.

Member Function Documentation

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

Definition at line 149 of file unointerfacetouniqueidentifiermapper.cxx.

References maEntries.

Referenced by getReference().

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

Definition at line 133 of file unointerfacetouniqueidentifiermapper.cxx.

References maEntries.

Referenced by getIdentifier().

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

Definition at line 185 of file unointerfacetouniqueidentifiermapper.cxx.

References maReserved.

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 105 of file unointerfacetouniqueidentifiermapper.cxx.

References findReference().

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

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 119 of file unointerfacetouniqueidentifiermapper.cxx.

References findIdentifier().

Referenced by xmloff::AnimationsImportHelperImpl::convertTarget(), xmloff::AnimationsImportHelperImpl::convertTiming(), XMLShapeImportHelper::restoreConnections(), and SdXMLGenericPageContext::SetNavigationOrder().

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(), XMLParaContext::EndElement(), xmloff::AnimationNodeContext::init_node(), registerReservedReference(), and SdXMLDrawPageContext::SdXMLDrawPageContext().

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
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 164 of file unointerfacetouniqueidentifiermapper.cxx.

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

Referenced by SdXMLFrameShapeContext::EndElement().

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

reserves an identifier for later registration.

Returns
false, if the identifier already exists

Definition at line 155 of file unointerfacetouniqueidentifiermapper.cxx.

References findReserved(), and maReserved.

Referenced by SdXMLFrameShapeContext::CreateChildContext().

Member Data Documentation

IdMap_t comphelper::UnoInterfaceToUniqueIdentifierMapper::maEntries
private

Definition at line 85 of file unointerfacetouniqueidentifiermapper.hxx.

Referenced by findIdentifier(), and findReference().

Reserved_t comphelper::UnoInterfaceToUniqueIdentifierMapper::maReserved
private
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: