Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Types | Public Member Functions | Friends | List of all members
keyple::common::ConcurrentMap< K, V > Class Template Reference

#include <ConcurrentMap.h>

Public Types

typedef K key_type
 
typedef std::pair< const K, V > value_type
 
typedef std::map< K, V >::iterator iterator
 
typedef std::map< K, V >::const_iterator const_iterator
 
typedef std::map< K, V >::size_type size_type
 

Public Member Functions

 ConcurrentMap ()
 
 ~ConcurrentMap ()=default
 
std::pair< iterator, bool > insert (const std::pair< const K, V > &val)
 
iterator insert (const_iterator position, const value_type &val)
 
template<class P >
iterator insert (const_iterator position, P &&val)
 
template<class InputIterator >
void insert (InputIterator first, InputIterator last)
 
size_type erase (const K &k)
 
iterator erase (const_iterator position)
 
size_type eraseFirstElement ()
 
void clear () noexcept
 
const_iterator find (const key_type &k)
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
size_type count (const K &k) const
 
size_type size () noexcept
 

Friends

std::ostream & operator<< (std::ostream &os, const ConcurrentMap< K, V > &cm)
 

Member Typedef Documentation

◆ const_iterator

template<typename K , typename V >
typedef std::map<K, V>::const_iterator keyple::common::ConcurrentMap< K, V >::const_iterator

◆ iterator

template<typename K , typename V >
typedef std::map<K, V>::iterator keyple::common::ConcurrentMap< K, V >::iterator

◆ key_type

template<typename K , typename V >
typedef K keyple::common::ConcurrentMap< K, V >::key_type

◆ size_type

template<typename K , typename V >
typedef std::map<K, V>::size_type keyple::common::ConcurrentMap< K, V >::size_type

◆ value_type

template<typename K , typename V >
typedef std::pair<const K, V> keyple::common::ConcurrentMap< K, V >::value_type

Constructor & Destructor Documentation

◆ ConcurrentMap()

template<typename K , typename V >
keyple::common::ConcurrentMap< K, V >::ConcurrentMap ( )
inline

◆ ~ConcurrentMap()

template<typename K , typename V >
keyple::common::ConcurrentMap< K, V >::~ConcurrentMap ( )
default

Member Function Documentation

◆ begin() [1/2]

template<typename K , typename V >
const_iterator keyple::common::ConcurrentMap< K, V >::begin ( ) const
inlinenoexcept

◆ begin() [2/2]

template<typename K , typename V >
iterator keyple::common::ConcurrentMap< K, V >::begin ( )
inlinenoexcept

◆ clear()

template<typename K , typename V >
void keyple::common::ConcurrentMap< K, V >::clear ( )
inlinenoexcept

◆ count()

template<typename K , typename V >
size_type keyple::common::ConcurrentMap< K, V >::count ( const K &  k) const
inline

◆ end() [1/2]

template<typename K , typename V >
const_iterator keyple::common::ConcurrentMap< K, V >::end ( ) const
inlinenoexcept

◆ end() [2/2]

template<typename K , typename V >
iterator keyple::common::ConcurrentMap< K, V >::end ( )
inlinenoexcept

◆ erase() [1/2]

template<typename K , typename V >
size_type keyple::common::ConcurrentMap< K, V >::erase ( const K &  k)
inline

◆ erase() [2/2]

template<typename K , typename V >
iterator keyple::common::ConcurrentMap< K, V >::erase ( const_iterator  position)
inline

◆ eraseFirstElement()

template<typename K , typename V >
size_type keyple::common::ConcurrentMap< K, V >::eraseFirstElement ( )
inline

◆ find()

template<typename K , typename V >
const_iterator keyple::common::ConcurrentMap< K, V >::find ( const key_type k)
inline

◆ insert() [1/4]

template<typename K , typename V >
std::pair<iterator, bool> keyple::common::ConcurrentMap< K, V >::insert ( const std::pair< const K, V > &  val)
inline

Single element (1)

◆ insert() [2/4]

template<typename K , typename V >
iterator keyple::common::ConcurrentMap< K, V >::insert ( const_iterator  position,
const value_type val 
)
inline

With hint (1)

◆ insert() [3/4]

template<typename K , typename V >
template<class P >
iterator keyple::common::ConcurrentMap< K, V >::insert ( const_iterator  position,
P &&  val 
)
inline

With hint (2)

◆ insert() [4/4]

template<typename K , typename V >
template<class InputIterator >
void keyple::common::ConcurrentMap< K, V >::insert ( InputIterator  first,
InputIterator  last 
)
inline

Range

◆ size()

template<typename K , typename V >
size_type keyple::common::ConcurrentMap< K, V >::size ( )
inlinenoexcept

Let's avoid using the mutex here as we would have to drop the 'const' from the function (impacts in other classes I'd rather avoid)

Friends And Related Function Documentation

◆ operator<<

template<typename K , typename V >
std::ostream& operator<< ( std::ostream &  os,
const ConcurrentMap< K, V > &  cm 
)
friend

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