LibreOffice Module comphelper (master) 1
|
#include <sequenceashashmap.hxx>
Public Types | |
using | iterator = SequenceAsHashMapBase::iterator |
using | const_iterator = SequenceAsHashMapBase::const_iterator |
Public Member Functions | |
SequenceAsHashMap () | |
creates an empty hash map. More... | |
SequenceAsHashMap (const css::uno::Any &aSource) | |
SequenceAsHashMap (const css::uno::Sequence< css::uno::Any > &lSource) | |
SequenceAsHashMap (const css::uno::Sequence< css::beans::PropertyValue > &lSource) | |
SequenceAsHashMap (const css::uno::Sequence< css::beans::NamedValue > &lSource) | |
void | operator<< (const css::uno::Any &aSource) |
fill this map from the given Any, which of course must contain a suitable sequence of element types "css.beans.PropertyValue" or "css.beans.NamedValue". More... | |
void | operator<< (const css::uno::Sequence< css::uno::Any > &lSource) |
fill this map from the given sequence, where every Any must contain an item from type "css.beans.PropertyValue" "css.beans.NamedValue". More... | |
void | operator<< (const css::uno::Sequence< css::beans::PropertyValue > &lSource) |
fill this map from the given PropertyValue sequence. More... | |
void | operator<< (const css::uno::Sequence< css::beans::NamedValue > &lSource) |
fill this map from the given NamedValue sequence. More... | |
void | operator>> (css::uno::Sequence< css::beans::PropertyValue > &lDestination) const |
converts this map instance to an PropertyValue sequence. More... | |
void | operator>> (css::uno::Sequence< css::beans::NamedValue > &lDestination) const |
converts this map instance to an NamedValue sequence. More... | |
css::uno::Any | getAsConstAny (bool bAsPropertyValue) const |
return this map instance as an Any, which can be used in const environments only. More... | |
css::uno::Sequence< css::beans::NamedValue > | getAsConstNamedValueList () const |
return this map instance to as a NamedValue sequence, which can be used in const environments only. More... | |
css::uno::Sequence< css::beans::PropertyValue > | getAsConstPropertyValueList () const |
return this map instance to as a PropertyValue sequence, which can be used in const environments only. More... | |
template<class TValueType > | |
TValueType | getUnpackedValueOrDefault (const OUString &sKey, const TValueType &aDefault) const |
check if the specified item exists and return its (unpacked!) value or it returns the specified default value otherwise. More... | |
css::uno::Any | getValue (const OUString &sKey) const |
check if the specified item exists and return its value or it returns an empty css::uno::Any. More... | |
template<class TValueType > | |
bool | createItemIfMissing (const OUString &sKey, const TValueType &aValue) |
creates a new item with the specified name and value only in case such item name does not already exist. More... | |
bool | match (const SequenceAsHashMap &rCheck) const |
check if all items of given map exists in these called map also. More... | |
void | update (const SequenceAsHashMap &rSource) |
merge all values from the given map into this one. More... | |
css::uno::Any & | operator[] (const OUString &rKey) |
css::uno::Any & | operator[] (const OUStringAndHashCode &rKey) |
void | clear () |
size_t | size () const |
bool | empty () const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
iterator | find (const OUString &rKey) |
const_iterator | find (const OUString &rKey) const |
iterator | find (const OUStringAndHashCode &rKey) |
const_iterator | find (const OUStringAndHashCode &rKey) const |
iterator | erase (iterator it) |
size_t | erase (const OUString &rKey) |
Private Attributes | |
SequenceAsHashMapBase | m_aMap |
Definition at line 66 of file sequenceashashmap.hxx.
using comphelper::SequenceAsHashMap::const_iterator = SequenceAsHashMapBase::const_iterator |
Definition at line 351 of file sequenceashashmap.hxx.
using comphelper::SequenceAsHashMap::iterator = SequenceAsHashMapBase::iterator |
Definition at line 350 of file sequenceashashmap.hxx.
comphelper::SequenceAsHashMap::SequenceAsHashMap | ( | ) |
creates an empty hash map.
Definition at line 103 of file sequenceashashmap.cxx.
comphelper::SequenceAsHashMap::SequenceAsHashMap | ( | const css::uno::Any & | aSource | ) |
Definition at line 107 of file sequenceashashmap.cxx.
comphelper::SequenceAsHashMap::SequenceAsHashMap | ( | const css::uno::Sequence< css::uno::Any > & | lSource | ) |
Definition at line 113 of file sequenceashashmap.cxx.
comphelper::SequenceAsHashMap::SequenceAsHashMap | ( | const css::uno::Sequence< css::beans::PropertyValue > & | lSource | ) |
Definition at line 118 of file sequenceashashmap.cxx.
comphelper::SequenceAsHashMap::SequenceAsHashMap | ( | const css::uno::Sequence< css::beans::NamedValue > & | lSource | ) |
Definition at line 123 of file sequenceashashmap.cxx.
|
inline |
Definition at line 368 of file sequenceashashmap.hxx.
Referenced by operator>>().
|
inline |
Definition at line 373 of file sequenceashashmap.hxx.
|
inline |
Definition at line 353 of file sequenceashashmap.hxx.
Referenced by operator<<().
|
inline |
creates a new item with the specified name and value only in case such item name does not already exist.
@descr To check if the property already exists only its name is used for compare. Its value isn't checked!
sKey | key name of the property. |
aValue | the new (unpacked!) value. Note: This value will be transformed to an Any internally, because only Any values can be part of a PropertyValue or NamedValue structure. |
Definition at line 297 of file sequenceashashmap.hxx.
|
inline |
Definition at line 363 of file sequenceashashmap.hxx.
|
inline |
Definition at line 378 of file sequenceashashmap.hxx.
Referenced by match(), and operator>>().
|
inline |
Definition at line 383 of file sequenceashashmap.hxx.
|
inline |
Definition at line 413 of file sequenceashashmap.hxx.
Definition at line 408 of file sequenceashashmap.hxx.
|
inline |
Definition at line 388 of file sequenceashashmap.hxx.
Referenced by match().
|
inline |
Definition at line 393 of file sequenceashashmap.hxx.
|
inline |
Definition at line 398 of file sequenceashashmap.hxx.
|
inline |
Definition at line 403 of file sequenceashashmap.hxx.
css::uno::Any comphelper::SequenceAsHashMap::getAsConstAny | ( | bool | bAsPropertyValue | ) | const |
return this map instance as an Any, which can be used in const environments only.
@descr It's made const to prevent using of the return value directly as an in/out parameter! usage: myMethod(stlDequeAdapter.getAsAnyList());
bAsPropertyValue | switch between using of PropertyValue or NamedValue as value type. |
Definition at line 259 of file sequenceashashmap.cxx.
References getAsConstNamedValueList(), and getAsConstPropertyValueList().
css::uno::Sequence< css::beans::NamedValue > comphelper::SequenceAsHashMap::getAsConstNamedValueList | ( | ) | const |
return this map instance to as a NamedValue sequence, which can be used in const environments only.
@descr It's made const to prevent using of the return value directly as an in/out parameter! usage: myMethod(stlDequeAdapter.getAsNamedValueList());
Definition at line 269 of file sequenceashashmap.cxx.
Referenced by getAsConstAny().
css::uno::Sequence< css::beans::PropertyValue > comphelper::SequenceAsHashMap::getAsConstPropertyValueList | ( | ) | const |
return this map instance to as a PropertyValue sequence, which can be used in const environments only.
@descr It's made const to prevent using of the return value directly as an in/out parameter! usage: myMethod(stlDequeAdapter.getAsPropertyValueList());
Definition at line 276 of file sequenceashashmap.cxx.
Referenced by getAsConstAny().
|
inline |
check if the specified item exists and return its (unpacked!) value or it returns the specified default value otherwise.
@descr If a value should be extracted only in case the requested property exists really (without creating of new items as it the index operator of a hash map does!) this method can be used.
sKey | key name of the item. |
aDefault | the default value, which is returned if the specified item could not be found. |
Definition at line 237 of file sequenceashashmap.hxx.
Referenced by comphelper::MimeConfigurationHelper::GetExportFilterFromImportFilter(), and comphelper::MimeConfigurationHelper::SearchForFilter().
|
inline |
check if the specified item exists and return its value or it returns an empty css::uno::Any.
@descr If a value should be extracted only in case the requested property exists really (without creating of new items as the index operator of a hash map does!) this method can be used.
sKey | key name of the item. |
Definition at line 266 of file sequenceashashmap.hxx.
bool comphelper::SequenceAsHashMap::match | ( | const SequenceAsHashMap & | rCheck | ) | const |
check if all items of given map exists in these called map also.
@descr Every item of the given map must exists with same name and value inside these map. But these map can contain additional items which are not part of the search-map.
rCheck | the map containing all items for checking. |
Definition at line 283 of file sequenceashashmap.cxx.
void comphelper::SequenceAsHashMap::operator<< | ( | const css::uno::Any & | aSource | ) |
fill this map from the given Any, which of course must contain a suitable sequence of element types "css.beans.PropertyValue" or "css.beans.NamedValue".
aSource | contains the new items for this map. |
A | css::lang::IllegalArgumentException is thrown, if the given Any does not contain a suitable sequence ... but not if it's a VOID Any! |
Definition at line 128 of file sequenceashashmap.cxx.
References clear().
void comphelper::SequenceAsHashMap::operator<< | ( | const css::uno::Sequence< css::beans::NamedValue > & | lSource | ) |
fill this map from the given NamedValue sequence.
lSource | contains the new items for this map. |
Definition at line 213 of file sequenceashashmap.cxx.
void comphelper::SequenceAsHashMap::operator<< | ( | const css::uno::Sequence< css::beans::PropertyValue > & | lSource | ) |
fill this map from the given PropertyValue sequence.
lSource | contains the new items for this map. |
Definition at line 201 of file sequenceashashmap.cxx.
void comphelper::SequenceAsHashMap::operator<< | ( | const css::uno::Sequence< css::uno::Any > & | lSource | ) |
fill this map from the given sequence, where every Any must contain an item from type "css.beans.PropertyValue" "css.beans.NamedValue".
lSource | contains the new items for this map. |
A | css::lang::IllegalArgumentException is thrown, if the given Any sequence uses wrong types for its items. VOID Any will be ignored! |
Definition at line 157 of file sequenceashashmap.cxx.
void comphelper::SequenceAsHashMap::operator>> | ( | css::uno::Sequence< css::beans::NamedValue > & | lDestination | ) | const |
void comphelper::SequenceAsHashMap::operator>> | ( | css::uno::Sequence< css::beans::PropertyValue > & | lDestination | ) | const |
|
inline |
Definition at line 340 of file sequenceashashmap.hxx.
|
inline |
Definition at line 345 of file sequenceashashmap.hxx.
|
inline |
Definition at line 358 of file sequenceashashmap.hxx.
Referenced by operator>>(), and update().
void comphelper::SequenceAsHashMap::update | ( | const SequenceAsHashMap & | rSource | ) |
merge all values from the given map into this one.
@descr Existing items will be overwritten ... missing items will be created new ... but non specified items will stay alive !
rSource | the map containing all items for the update. |
Definition at line 302 of file sequenceashashmap.cxx.
|
private |
Definition at line 419 of file sequenceashashmap.hxx.
Referenced by operator<<(), and update().