Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4AccMap< Key, T, Compare, Allocator > Class Template Reference

#include <G4AccMap.hh>

Inheritance diagram for G4AccMap< Key, T, Compare, Allocator >:

Public Member Functions

 G4AccMap (const G4String &name="", G4MergeMode mergeMode=G4MergeMode::kAddition)
 G4AccMap (const Compare &comp, G4MergeMode mergeMode=G4MergeMode::kAddition, const Allocator &alloc=Allocator())
 G4AccMap (const G4String &name, const Compare &comp, G4MergeMode mergeMode=G4MergeMode::kAddition, const Allocator &alloc=Allocator())
 G4AccMap (const Allocator &alloc, G4MergeMode mergeMode=G4MergeMode::kAddition)
 G4AccMap (const G4String &name, const Allocator &alloc, G4MergeMode mergeMode=G4MergeMode::kAddition)
 G4AccMap (std::initializer_list< std::pair< const Key, T > > init, G4MergeMode mergeMode=G4MergeMode::kAddition, const Compare &comp=Compare(), const Allocator &alloc=Allocator())
 G4AccMap (const G4String &name, std::initializer_list< std::pair< const Key, T > > init, G4MergeMode mergeMode=G4MergeMode::kAddition, const Compare &comp=Compare(), const Allocator &alloc=Allocator())
 G4AccMap (const G4AccMap &rhs)=default
 G4AccMap (const G4AccMap &rhs, const Allocator &allocator)
 G4AccMap (G4AccMap &&rhs)=default
 G4AccMap (G4AccMap &&rhs, const Allocator &allocator)
 ~G4AccMap () override=default
T & operator[] (const Key &key)
T & operator[] (Key &&key)
T & at (const Key &key)
const T & at (const Key &key) const
std::map< Key, T, Compare, Allocator >::size_type size () const
std::map< Key, T, Compare, Allocator >::iterator begin ()
std::map< Key, T, Compare, Allocator >::const_iterator begin () const
std::map< Key, T, Compare, Allocator >::const_iterator cbegin () const
std::map< Key, T, Compare, Allocator >::iterator end ()
std::map< Key, T, Compare, Allocator >::const_iterator end () const
std::map< Key, T, Compare, Allocator >::const_iterator cend () const
void clear ()
std::pair< typename std::map< Key, T, Compare, Allocator >::iterator, bool > insert (const T &value)
template<class P>
std::pair< typename std::map< Key, T, Compare, Allocator >::iterator, bool > insert (P &&value)
std::pair< typename std::map< Key, T, Compare, Allocator >::iterator, bool > insert (T &&value)
std::map< Key, T, Compare, Allocator >::iterator find (const Key &key)
std::map< Key, T, Compare, Allocator >::const_iterator find (const Key &key) const
void Merge (const G4VAccumulable &other) final
void Reset () final
void Print (G4PrintOptions options=G4PrintOptions()) const final
void SetMergeMode (G4MergeMode value) final
void SetInitValue (const T &value)
G4AccType GetType () const final
std::map< Key, T, Compare, Allocator > & GetMap ()
const std::map< Key, T, Compare, Allocator > & GetMap () const
Public Member Functions inherited from G4VAccumulable
 G4VAccumulable (G4MergeMode mergeMode=G4MergeMode::kAddition)
 G4VAccumulable (const G4String &name, G4MergeMode mergeMode=G4MergeMode::kAddition)
 G4VAccumulable (const G4VAccumulable &rhs)=default
 G4VAccumulable (G4VAccumulable &&rhs)=default
virtual ~G4VAccumulable ()=default
G4VAccumulableoperator= (const G4VAccumulable &rhs)=default
G4VAccumulableoperator= (G4VAccumulable &&rhs)=default
void SetName (const G4String &name)
void SetId (G4int id)
G4String GetName () const
G4MergeMode GetMergeMode () const
G4int GetId () const

Additional Inherited Members

Protected Member Functions inherited from G4VAccumulable
void PrintBase (G4PrintOptions options) const
Protected Attributes inherited from G4VAccumulable
G4String fName
G4MergeMode fMergeMode = G4MergeMode::kAddition
G4int fId = G4Accumulables::kInvalidId

Detailed Description

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
class G4AccMap< Key, T, Compare, Allocator >

Definition at line 45 of file G4AccMap.hh.

Constructor & Destructor Documentation

◆ G4AccMap() [1/11]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::G4AccMap ( const G4String & name = "",
G4MergeMode mergeMode = G4MergeMode::kAddition )

Referenced by G4AccMap(), G4AccMap(), G4AccMap(), and G4AccMap().

◆ G4AccMap() [2/11]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::G4AccMap ( const Compare & comp,
G4MergeMode mergeMode = G4MergeMode::kAddition,
const Allocator & alloc = Allocator() )

◆ G4AccMap() [3/11]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::G4AccMap ( const G4String & name,
const Compare & comp,
G4MergeMode mergeMode = G4MergeMode::kAddition,
const Allocator & alloc = Allocator() )

◆ G4AccMap() [4/11]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::G4AccMap ( const Allocator & alloc,
G4MergeMode mergeMode = G4MergeMode::kAddition )

◆ G4AccMap() [5/11]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::G4AccMap ( const G4String & name,
const Allocator & alloc,
G4MergeMode mergeMode = G4MergeMode::kAddition )

◆ G4AccMap() [6/11]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::G4AccMap ( std::initializer_list< std::pair< const Key, T > > init,
G4MergeMode mergeMode = G4MergeMode::kAddition,
const Compare & comp = Compare(),
const Allocator & alloc = Allocator() )

◆ G4AccMap() [7/11]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::G4AccMap ( const G4String & name,
std::initializer_list< std::pair< const Key, T > > init,
G4MergeMode mergeMode = G4MergeMode::kAddition,
const Compare & comp = Compare(),
const Allocator & alloc = Allocator() )

◆ G4AccMap() [8/11]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::G4AccMap ( const G4AccMap< Key, T, Compare, Allocator > & rhs)
default

◆ G4AccMap() [9/11]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::G4AccMap ( const G4AccMap< Key, T, Compare, Allocator > & rhs,
const Allocator & allocator )

◆ G4AccMap() [10/11]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::G4AccMap ( G4AccMap< Key, T, Compare, Allocator > && rhs)
default

◆ G4AccMap() [11/11]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::G4AccMap ( G4AccMap< Key, T, Compare, Allocator > && rhs,
const Allocator & allocator )

◆ ~G4AccMap()

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccMap< Key, T, Compare, Allocator >::~G4AccMap ( )
overridedefault

Member Function Documentation

◆ at() [1/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
T & G4AccMap< Key, T, Compare, Allocator >::at ( const Key & key)
inline

Definition at line 154 of file G4AccMap.hh.

154{ return fMap[key]; }

◆ at() [2/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
const T & G4AccMap< Key, T, Compare, Allocator >::at ( const Key & key) const
inline

Definition at line 155 of file G4AccMap.hh.

155{ return fMap[key]; }

◆ begin() [1/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::map< Key, T, Compare, Allocator >::iterator G4AccMap< Key, T, Compare, Allocator >::begin ( )
inline

Definition at line 159 of file G4AccMap.hh.

159{ return fMap.begin(); }

◆ begin() [2/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::map< Key, T, Compare, Allocator >::const_iterator G4AccMap< Key, T, Compare, Allocator >::begin ( ) const
inline

Definition at line 160 of file G4AccMap.hh.

160{ return fMap.begin(); }

◆ cbegin()

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::map< Key, T, Compare, Allocator >::const_iterator G4AccMap< Key, T, Compare, Allocator >::cbegin ( ) const
inline

Definition at line 161 of file G4AccMap.hh.

161{ return fMap.cbegin(); }

◆ cend()

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::map< Key, T, Compare, Allocator >::const_iterator G4AccMap< Key, T, Compare, Allocator >::cend ( ) const
inline

Definition at line 165 of file G4AccMap.hh.

165{ return fMap.cend(); }

◆ clear()

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
void G4AccMap< Key, T, Compare, Allocator >::clear ( )
inline

Definition at line 167 of file G4AccMap.hh.

167{ fMap.clear(); }

◆ end() [1/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::map< Key, T, Compare, Allocator >::iterator G4AccMap< Key, T, Compare, Allocator >::end ( )
inline

Definition at line 163 of file G4AccMap.hh.

163{ return fMap.end(); }

◆ end() [2/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::map< Key, T, Compare, Allocator >::const_iterator G4AccMap< Key, T, Compare, Allocator >::end ( ) const
inline

Definition at line 164 of file G4AccMap.hh.

164{ return fMap.end(); }

◆ find() [1/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::map< Key, T, Compare, Allocator >::iterator G4AccMap< Key, T, Compare, Allocator >::find ( const Key & key)
inline

Definition at line 174 of file G4AccMap.hh.

174{ return fMap.find(key); }

◆ find() [2/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::map< Key, T, Compare, Allocator >::const_iterator G4AccMap< Key, T, Compare, Allocator >::find ( const Key & key) const
inline

Definition at line 175 of file G4AccMap.hh.

175{ return fMap.find(key); }

◆ GetMap() [1/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::map< Key, T, Compare, Allocator > & G4AccMap< Key, T, Compare, Allocator >::GetMap ( )
inline

Definition at line 186 of file G4AccMap.hh.

186{ return fMap; }

◆ GetMap() [2/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
const std::map< Key, T, Compare, Allocator > & G4AccMap< Key, T, Compare, Allocator >::GetMap ( ) const
inline

Definition at line 187 of file G4AccMap.hh.

187{ return fMap; }

◆ GetType()

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
G4AccType G4AccMap< Key, T, Compare, Allocator >::GetType ( ) const
inlinefinalvirtual

Reimplemented from G4VAccumulable.

Definition at line 185 of file G4AccMap.hh.

185{ return G4AccType::kMap; }

Referenced by GetType().

◆ insert() [1/3]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::pair< typename std::map< Key, T, Compare, Allocator >::iterator, bool > G4AccMap< Key, T, Compare, Allocator >::insert ( const T & value)
inline

Definition at line 169 of file G4AccMap.hh.

169{ return fMap.insert(value); }

◆ insert() [2/3]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class P>
std::pair< typename std::map< Key, T, Compare, Allocator >::iterator, bool > G4AccMap< Key, T, Compare, Allocator >::insert ( P && value)
inline

Definition at line 171 of file G4AccMap.hh.

171{ return fMap.insert(std::move(value)); }

◆ insert() [3/3]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::pair< typename std::map< Key, T, Compare, Allocator >::iterator, bool > G4AccMap< Key, T, Compare, Allocator >::insert ( T && value)
inline

Definition at line 172 of file G4AccMap.hh.

172{ return fMap.insert(std::move(value)); }

◆ Merge()

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
void G4AccMap< Key, T, Compare, Allocator >::Merge ( const G4VAccumulable & other)
finalvirtual

Implements G4VAccumulable.

◆ operator[]() [1/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
T & G4AccMap< Key, T, Compare, Allocator >::operator[] ( const Key & key)
inline

Definition at line 151 of file G4AccMap.hh.

151{ return fMap[key]; }

◆ operator[]() [2/2]

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
T & G4AccMap< Key, T, Compare, Allocator >::operator[] ( Key && key)
inline

Definition at line 152 of file G4AccMap.hh.

152{ return fMap[std::move(key)]; }

◆ Print()

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
void G4AccMap< Key, T, Compare, Allocator >::Print ( G4PrintOptions options = G4PrintOptions()) const
finalvirtual

Reimplemented from G4VAccumulable.

Referenced by Print().

◆ Reset()

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
void G4AccMap< Key, T, Compare, Allocator >::Reset ( )
finalvirtual

Implements G4VAccumulable.

◆ SetInitValue()

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
void G4AccMap< Key, T, Compare, Allocator >::SetInitValue ( const T & value)

Referenced by SetInitValue().

◆ SetMergeMode()

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
void G4AccMap< Key, T, Compare, Allocator >::SetMergeMode ( G4MergeMode value)
finalvirtual

Reimplemented from G4VAccumulable.

Referenced by SetMergeMode().

◆ size()

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::map< Key, T, Compare, Allocator >::size_type G4AccMap< Key, T, Compare, Allocator >::size ( ) const
inline

Definition at line 157 of file G4AccMap.hh.

157{ return fMap.size(); }

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