ATLAS Offline Software
Loading...
Searching...
No Matches
CxxUtils::ConcurrentRangeMap< RANGE, KEY, T, COMPARE, UPDATER >::Impl Class Reference

Holds one version of the map. More...

#include <ConcurrentRangeMap.h>

Collaboration diagram for CxxUtils::ConcurrentRangeMap< RANGE, KEY, T, COMPARE, UPDATER >::Impl:

Public Member Functions

 Impl (size_t capacity=10)
 Constructor.
 ~Impl ()=default
 Destructor.
value_typedata ()
 Return a pointer to the start of the data vector.
size_t capacity () const
 Return the size of the current data vector.

Private Attributes

std::vector< value_typem_data
 Vector holding the map data.

Detailed Description

template<class RANGE, class KEY, class T, class COMPARE, template< class > class UPDATER>
class CxxUtils::ConcurrentRangeMap< RANGE, KEY, T, COMPARE, UPDATER >::Impl

Holds one version of the map.

This object holds one version of the map. Within a single version, we can add elements to the end or remove elements from the beginning. If we need to make other changes, or to expand the map, we must make a new version and copy the contents. The UPDATER object is then used to install the new version; old versions should be kept until they are no longer referenced by any thread.

Definition at line 302 of file ConcurrentRangeMap.h.

Constructor & Destructor Documentation

◆ Impl()

template<class RANGE, class KEY, class T, class COMPARE, template< class > class UPDATER>
CxxUtils::ConcurrentRangeMap< RANGE, KEY, T, COMPARE, UPDATER >::Impl::Impl ( size_t capacity = 10)

Constructor.

Parameters
capacitySize of the data vector to allocate.

◆ ~Impl()

template<class RANGE, class KEY, class T, class COMPARE, template< class > class UPDATER>
CxxUtils::ConcurrentRangeMap< RANGE, KEY, T, COMPARE, UPDATER >::Impl::~Impl ( )
default

Destructor.

Member Function Documentation

◆ capacity()

template<class RANGE, class KEY, class T, class COMPARE, template< class > class UPDATER>
size_t CxxUtils::ConcurrentRangeMap< RANGE, KEY, T, COMPARE, UPDATER >::Impl::capacity ( ) const

Return the size of the current data vector.

◆ data()

template<class RANGE, class KEY, class T, class COMPARE, template< class > class UPDATER>
value_type * CxxUtils::ConcurrentRangeMap< RANGE, KEY, T, COMPARE, UPDATER >::Impl::data ( )

Return a pointer to the start of the data vector.

Member Data Documentation

◆ m_data

template<class RANGE, class KEY, class T, class COMPARE, template< class > class UPDATER>
std::vector<value_type> CxxUtils::ConcurrentRangeMap< RANGE, KEY, T, COMPARE, UPDATER >::Impl::m_data
private

Vector holding the map data.

Definition at line 332 of file ConcurrentRangeMap.h.


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