LibreOffice
LibreOffice 24.2 SDK C/C++ API Reference
Public Member Functions | List of all members
cppu::UnoUrlDescriptor Class Reference

A descriptor as part of a UNO URL (connection descriptor or protocol descriptor). More...

#include <unourl.hxx>

Public Member Functions

 UnoUrlDescriptor (rtl::OUString const &rDescriptor)
 Construct a descriptor from a string representation. More...
 
 UnoUrlDescriptor (UnoUrlDescriptor const &rOther)
 
 ~UnoUrlDescriptor ()
 
UnoUrlDescriptoroperator= (UnoUrlDescriptor const &rOther)
 
rtl::OUString const & getDescriptor () const
 Return the string representation of the descriptor. More...
 
rtl::OUString const & getName () const
 Return the name component of the descriptor. More...
 
bool hasParameter (rtl::OUString const &rKey) const
 Test whether the parameters contain a key. More...
 
rtl::OUString getParameter (rtl::OUString const &rKey) const
 Return the parameter value for a key. More...
 

Detailed Description

A descriptor as part of a UNO URL (connection descriptor or protocol descriptor).

Such a descriptor can also be useful outside the context of a full UNO URL. For example, some functions take a string representing a connection or protocol descriptor as input, and can use this class to parse the string.

Constructor & Destructor Documentation

◆ UnoUrlDescriptor() [1/2]

cppu::UnoUrlDescriptor::UnoUrlDescriptor ( rtl::OUString const &  rDescriptor)
explicit

Construct a descriptor from a string representation.

Parameters
rDescriptorThe string representation of a descriptor.
Exceptions
rtl::MalformedUriExceptionThrown when the given string representation is invalid.

◆ UnoUrlDescriptor() [2/2]

cppu::UnoUrlDescriptor::UnoUrlDescriptor ( UnoUrlDescriptor const &  rOther)

◆ ~UnoUrlDescriptor()

cppu::UnoUrlDescriptor::~UnoUrlDescriptor ( )

Member Function Documentation

◆ getDescriptor()

rtl::OUString const& cppu::UnoUrlDescriptor::getDescriptor ( ) const

Return the string representation of the descriptor.

Returns
A reference to the string representation used to construct this descriptor, without any modifications. The reference is valid for the lifetime of this URL object.

◆ getName()

rtl::OUString const& cppu::UnoUrlDescriptor::getName ( ) const

Return the name component of the descriptor.

Returns
A reference to the (case insensitive) name, in lower case form. The reference is valid for the lifetime of this URL object.

◆ getParameter()

rtl::OUString cppu::UnoUrlDescriptor::getParameter ( rtl::OUString const &  rKey) const

Return the parameter value for a key.

Parameters
rKeyA (case insensitive) key.
Returns
The (case sensitive) value associated with the given key, or an empty string if there is no matching key/value pair.

◆ hasParameter()

bool cppu::UnoUrlDescriptor::hasParameter ( rtl::OUString const &  rKey) const

Test whether the parameters contain a key.

Parameters
rKeyA (case insensitive) key.
Returns
True if the parameters contain a matching key/value pair.

◆ operator=()

UnoUrlDescriptor& cppu::UnoUrlDescriptor::operator= ( UnoUrlDescriptor const &  rOther)

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