LibreOffice Module oox (master) 1
|
Template for a map of ref-counted objects with additional accessor functions. More...
#include <refmap.hxx>
Classes | |
struct | ForEachFunctor |
struct | ForEachFunctorWithKey |
Public Types | |
typedef std::map< KeyType, std::shared_ptr< ObjType >, CompType > | container_type |
typedef container_type::key_type | key_type |
typedef container_type::mapped_type | mapped_type |
typedef container_type::value_type | value_type |
typedef container_type::key_compare | key_compare |
Public Member Functions | |
bool | has (key_type nKey) const |
Returns true, if the object associated to the passed key exists. More... | |
mapped_type | get (key_type nKey) const |
Returns a reference to the object associated to the passed key, or an empty reference on error. More... | |
template<typename FunctorType > | |
void | forEach (const FunctorType &rFunctor) const |
Calls the passed functor for every contained object, automatically skips all elements that are empty references. More... | |
template<typename FuncType > | |
void | forEachMem (FuncType pFunc) const |
Calls the passed member function of ObjType on every contained object, automatically skips all elements that are empty references. More... | |
template<typename FuncType , typename ParamType1 , typename ParamType2 > | |
void | forEachMem (FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2) const |
Calls the passed member function of ObjType on every contained object, automatically skips all elements that are empty references. More... | |
template<typename FuncType , typename ParamType1 , typename ParamType2 , typename ParamType3 > | |
void | forEachMem (FuncType pFunc, ParamType1 aParam1, ParamType2 aParam2, ParamType3 aParam3) const |
Calls the passed member function of ObjType on every contained object, automatically skips all elements that are empty references. More... | |
template<typename FunctorType > | |
void | forEachWithKey (const FunctorType &rFunctor) const |
Calls the passed functor for every contained object. More... | |
template<typename FuncType > | |
void | forEachMemWithKey (FuncType pFunc) const |
Calls the passed member function of ObjType on every contained object. More... | |
Private Member Functions | |
const mapped_type * | getRef (key_type nKey) const |
Template for a map of ref-counted objects with additional accessor functions.
An instance of the class RefMap< Type > stores elements of the type std::shared_ptr< Type >. The new accessor functions has() and get() work correctly for nonexisting keys, there is no need to check the passed key before.
Definition at line 40 of file refmap.hxx.
typedef std::map< KeyType, std::shared_ptr< ObjType >, CompType > oox::RefMap< KeyType, ObjType, CompType >::container_type |
Definition at line 43 of file refmap.hxx.
typedef container_type::key_compare oox::RefMap< KeyType, ObjType, CompType >::key_compare |
Definition at line 47 of file refmap.hxx.
typedef container_type::key_type oox::RefMap< KeyType, ObjType, CompType >::key_type |
Definition at line 44 of file refmap.hxx.
typedef container_type::mapped_type oox::RefMap< KeyType, ObjType, CompType >::mapped_type |
Definition at line 45 of file refmap.hxx.
typedef container_type::value_type oox::RefMap< KeyType, ObjType, CompType >::value_type |
Definition at line 46 of file refmap.hxx.
|
inline |
Calls the passed functor for every contained object, automatically skips all elements that are empty references.
Definition at line 69 of file refmap.hxx.
Referenced by oox::RefMap< KeyType, ObjType, CompType >::forEachMem().
|
inline |
Calls the passed member function of ObjType on every contained object, automatically skips all elements that are empty references.
Definition at line 77 of file refmap.hxx.
References oox::RefMap< KeyType, ObjType, CompType >::forEach().
Referenced by oox::ole::VbaProject::importModulesAndForms().
|
inline |
Calls the passed member function of ObjType on every contained object, automatically skips all elements that are empty references.
Definition at line 85 of file refmap.hxx.
References oox::RefMap< KeyType, ObjType, CompType >::forEach().
|
inline |
Calls the passed member function of ObjType on every contained object, automatically skips all elements that are empty references.
Definition at line 93 of file refmap.hxx.
References oox::RefMap< KeyType, ObjType, CompType >::forEach().
|
inline |
Calls the passed member function of ObjType on every contained object.
Passes the object key as argument to the member function.
Definition at line 110 of file refmap.hxx.
References oox::RefMap< KeyType, ObjType, CompType >::forEachWithKey().
|
inline |
Calls the passed functor for every contained object.
Passes the key as first argument and the object reference as second argument to rFunctor.
Definition at line 102 of file refmap.hxx.
Referenced by oox::RefMap< KeyType, ObjType, CompType >::forEachMemWithKey().
|
inline |
Returns a reference to the object associated to the passed key, or an empty reference on error.
Definition at line 60 of file refmap.hxx.
References oox::RefMap< KeyType, ObjType, CompType >::getRef().
Referenced by oox::drawingml::chart::SeriesConverter::createDataSeries(), oox::drawingml::chart::ErrorBarConverter::createLabeledDataSequence(), oox::drawingml::chart::SeriesConverter::createLabeledDataSequence(), oox::drawingml::Theme::getFontStyle(), oox::vml::ShapeContainer::getShapeById(), oox::vml::ShapeContainer::getShapeTypeById(), oox::drawingml::chart::ObjectFormatterData::getTypeFormatter(), oox::ole::VbaProject::importModulesAndForms(), oox::ole::VbaProject::readVbaModules(), and oox::drawingml::Theme::resolveFont().
|
inlineprivate |
Definition at line 133 of file refmap.hxx.
Referenced by oox::RefMap< KeyType, ObjType, CompType >::get(), and oox::RefMap< KeyType, ObjType, CompType >::has().
|
inline |
Returns true, if the object associated to the passed key exists.
Returns false, if the key exists but points to an empty reference.
Definition at line 52 of file refmap.hxx.
References oox::RefMap< KeyType, ObjType, CompType >::getRef().
Referenced by oox::drawingml::chart::TypeGroupConverter::createCategorySequence(), oox::drawingml::chart::ObjectFormatterData::getTypeFormatter(), oox::ole::VbaProject::importModulesAndForms(), oox::drawingml::chart::SeriesContextBase::onCreateContext(), and oox::ole::VbaProject::readVbaModules().