AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::sidre::MapCollection< T > Class Template Reference

MapCollection is a container class template for holding a collection of items of template parameter type T. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/sidre/core/MapCollection.hpp>

Inheritance diagram for axom::sidre::MapCollection< T >:

Public Types

using value_type = T
 
using iterator = typename ItemCollection< T >::iterator
 
using const_iterator = typename ItemCollection< T >::const_iterator
 

Public Member Functions

size_t getNumItems () const
 
IndexType getFirstValidIndex () const
 
IndexType getNextValidIndex (IndexType idx) const
 
bool hasItem (const std::string &name) const
 
bool hasItem (IndexType idx) const
 
T * getItem (const std::string &name)
 
T const * getItem (const std::string &name) const
 
T * getItem (IndexType idx)
 
T const * getItem (IndexType idx) const
 
const std::string & getItemName (IndexType idx) const
 
IndexType getItemIndex (const std::string &name) const
 
IndexType insertItem (T *item, const std::string &name)
 
T * removeItem (const std::string &name)
 
T * removeItem (IndexType idx)
 
void removeAllItems ()
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator begin () const
 
const_iterator end () const
 
iterator_adaptor getIteratorAdaptor ()
 Returns an adaptor wrapping this collection in support of iteration. More...
 
const_iterator_adaptor getIteratorAdaptor () const
 Returns a const adaptor wrapping this collection in support of iteration. More...
 

Detailed Description

template<typename T>
class axom::sidre::MapCollection< T >

MapCollection is a container class template for holding a collection of items of template parameter type T.

Warning
Only std::map and std::unordered_map have been tried so far. These classes have identical APIs for the functionality we are using.

Member Typedef Documentation

◆ value_type

template<typename T >
using axom::sidre::MapCollection< T >::value_type = T

◆ iterator

template<typename T >
using axom::sidre::MapCollection< T >::iterator = typename ItemCollection<T>::iterator

◆ const_iterator

template<typename T >
using axom::sidre::MapCollection< T >::const_iterator = typename ItemCollection<T>::const_iterator

Member Function Documentation

◆ getNumItems()

template<typename T >
size_t axom::sidre::MapCollection< T >::getNumItems ( ) const
inlinevirtual

◆ getFirstValidIndex()

template<typename T >
IndexType axom::sidre::MapCollection< T >::getFirstValidIndex
virtual

◆ getNextValidIndex()

template<typename T >
IndexType axom::sidre::MapCollection< T >::getNextValidIndex ( IndexType  idx) const
virtual

◆ hasItem() [1/2]

template<typename T >
bool axom::sidre::MapCollection< T >::hasItem ( const std::string &  name) const
inline

◆ hasItem() [2/2]

template<typename T >
bool axom::sidre::MapCollection< T >::hasItem ( IndexType  idx) const
inlinevirtual

◆ getItem() [1/4]

template<typename T >
T* axom::sidre::MapCollection< T >::getItem ( const std::string &  name)
inline

◆ getItem() [2/4]

template<typename T >
T const* axom::sidre::MapCollection< T >::getItem ( const std::string &  name) const
inline

◆ getItem() [3/4]

template<typename T >
T* axom::sidre::MapCollection< T >::getItem ( IndexType  idx)
inlinevirtual

◆ getItem() [4/4]

template<typename T >
T const* axom::sidre::MapCollection< T >::getItem ( IndexType  idx) const
inlinevirtual

◆ getItemName()

template<typename T >
const std::string& axom::sidre::MapCollection< T >::getItemName ( IndexType  idx) const
inline

◆ getItemIndex()

template<typename T >
IndexType axom::sidre::MapCollection< T >::getItemIndex ( const std::string &  name) const
inline

◆ insertItem()

template<typename T >
IndexType axom::sidre::MapCollection< T >::insertItem ( T *  item,
const std::string &  name 
)
virtual

◆ removeItem() [1/2]

template<typename T >
T * axom::sidre::MapCollection< T >::removeItem ( const std::string &  name)

◆ removeItem() [2/2]

template<typename T >
T * axom::sidre::MapCollection< T >::removeItem ( IndexType  idx)
virtual

◆ removeAllItems()

template<typename T >
void axom::sidre::MapCollection< T >::removeAllItems ( )
inlinevirtual

◆ begin() [1/2]

template<typename T >
iterator axom::sidre::MapCollection< T >::begin ( )
inlinevirtual

◆ end() [1/2]

template<typename T >
iterator axom::sidre::MapCollection< T >::end ( )
inlinevirtual

◆ cbegin()

template<typename T >
const_iterator axom::sidre::MapCollection< T >::cbegin ( ) const
inlinevirtual

◆ cend()

template<typename T >
const_iterator axom::sidre::MapCollection< T >::cend ( ) const
inlinevirtual

◆ begin() [2/2]

template<typename T >
const_iterator axom::sidre::MapCollection< T >::begin ( ) const
inlinevirtual

◆ end() [2/2]

template<typename T >
const_iterator axom::sidre::MapCollection< T >::end ( ) const
inlinevirtual

◆ getIteratorAdaptor() [1/2]

template<typename T >
iterator_adaptor axom::sidre::ItemCollection< T >::getIteratorAdaptor ( )
inlineinherited

Returns an adaptor wrapping this collection in support of iteration.

◆ getIteratorAdaptor() [2/2]

template<typename T >
const_iterator_adaptor axom::sidre::ItemCollection< T >::getIteratorAdaptor ( ) const
inlineinherited

Returns a const adaptor wrapping this collection in support of iteration.


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