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

#include <G4AccVector.hh>

Inheritance diagram for G4AccVector< T, Allocator >:

Public Member Functions

 G4AccVector (const G4String &name="", G4MergeMode mergeMode=G4MergeMode::kAddition)
 G4AccVector (const Allocator &alloc, G4MergeMode mergeMode=G4MergeMode::kAddition)
 G4AccVector (const G4String &name, const Allocator &alloc, G4MergeMode mergeMode=G4MergeMode::kAddition)
 G4AccVector (std::size_t count, const T &value, G4MergeMode mergeMode=G4MergeMode::kAddition, const Allocator &allocator=Allocator())
 G4AccVector (const G4String &name, std::size_t count, const T &value, G4MergeMode mergeMode=G4MergeMode::kAddition, const Allocator &allocator=Allocator())
 G4AccVector (std::size_t count, G4MergeMode mergeMode=G4MergeMode::kAddition, const Allocator &allocator=Allocator())
 G4AccVector (const G4String &name, std::size_t count, G4MergeMode mergeMode=G4MergeMode::kAddition, const Allocator &allocator=Allocator())
 G4AccVector (std::initializer_list< T > init, G4MergeMode mergeMode=G4MergeMode::kAddition, const Allocator &allocator=Allocator())
 G4AccVector (const G4String &name, std::initializer_list< T > init, G4MergeMode mergeMode=G4MergeMode::kAddition, const Allocator &allocator=Allocator())
 G4AccVector (const G4AccVector &rhs)=default
 G4AccVector (const G4AccVector &rhs, const Allocator &allocator)
 G4AccVector (G4AccVector &&rhs)=default
 G4AccVector (G4AccVector &&rhs, const Allocator &allocator)
 ~G4AccVector () override=default
T & operator[] (typename std::vector< T >::size_type i)
T & at (typename std::vector< T >::size_type i)
std::vector< T >::size_type size () const
std::vector< T >::iterator begin ()
std::vector< T >::const_iterator begin () const
std::vector< T >::const_iterator cbegin () const
std::vector< T >::iterator end ()
std::vector< T >::const_iterator end () const
std::vector< T >::const_iterator cend () const
void clear ()
void push_back (const T &value)
void push_back (T &&value)
template<class... Args>
void emplace_back (Args &&... args)
template<class... Args>
T & emplace_back (Args &&... args)
void pop_back ()
void Merge (const G4VAccumulable &other) final
void Reset () final
void Print (G4PrintOptions options=G4PrintOptions()) const final
void SetMergeMode (G4MergeMode value) final
G4AccType GetType () const final
std::vector< T > & GetVector ()
const std::vector< T > & GetVector () 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 T, class Allocator = std::allocator<T>>
class G4AccVector< T, Allocator >

Definition at line 44 of file G4AccVector.hh.

Constructor & Destructor Documentation

◆ G4AccVector() [1/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( const G4String & name = "",
G4MergeMode mergeMode = G4MergeMode::kAddition )

◆ G4AccVector() [2/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( const Allocator & alloc,
G4MergeMode mergeMode = G4MergeMode::kAddition )

◆ G4AccVector() [3/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( const G4String & name,
const Allocator & alloc,
G4MergeMode mergeMode = G4MergeMode::kAddition )

◆ G4AccVector() [4/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( std::size_t count,
const T & value,
G4MergeMode mergeMode = G4MergeMode::kAddition,
const Allocator & allocator = Allocator() )

◆ G4AccVector() [5/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( const G4String & name,
std::size_t count,
const T & value,
G4MergeMode mergeMode = G4MergeMode::kAddition,
const Allocator & allocator = Allocator() )

◆ G4AccVector() [6/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( std::size_t count,
G4MergeMode mergeMode = G4MergeMode::kAddition,
const Allocator & allocator = Allocator() )

◆ G4AccVector() [7/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( const G4String & name,
std::size_t count,
G4MergeMode mergeMode = G4MergeMode::kAddition,
const Allocator & allocator = Allocator() )

◆ G4AccVector() [8/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( std::initializer_list< T > init,
G4MergeMode mergeMode = G4MergeMode::kAddition,
const Allocator & allocator = Allocator() )

◆ G4AccVector() [9/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( const G4String & name,
std::initializer_list< T > init,
G4MergeMode mergeMode = G4MergeMode::kAddition,
const Allocator & allocator = Allocator() )

◆ G4AccVector() [10/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( const G4AccVector< T, Allocator > & rhs)
default

◆ G4AccVector() [11/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( const G4AccVector< T, Allocator > & rhs,
const Allocator & allocator )

◆ G4AccVector() [12/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( G4AccVector< T, Allocator > && rhs)
default

◆ G4AccVector() [13/13]

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::G4AccVector ( G4AccVector< T, Allocator > && rhs,
const Allocator & allocator )

◆ ~G4AccVector()

template<class T, class Allocator = std::allocator<T>>
G4AccVector< T, Allocator >::~G4AccVector ( )
overridedefault

Member Function Documentation

◆ at()

template<class T, class Allocator = std::allocator<T>>
T & G4AccVector< T, Allocator >::at ( typename std::vector< T >::size_type i)
inline

Definition at line 150 of file G4AccVector.hh.

150{ return fVector.at(i); }

◆ begin() [1/2]

template<class T, class Allocator = std::allocator<T>>
std::vector< T >::iterator G4AccVector< T, Allocator >::begin ( )
inline

Definition at line 154 of file G4AccVector.hh.

154{ return fVector.begin(); }

◆ begin() [2/2]

template<class T, class Allocator = std::allocator<T>>
std::vector< T >::const_iterator G4AccVector< T, Allocator >::begin ( ) const
inline

Definition at line 155 of file G4AccVector.hh.

155{ return fVector.begin(); }

◆ cbegin()

template<class T, class Allocator = std::allocator<T>>
std::vector< T >::const_iterator G4AccVector< T, Allocator >::cbegin ( ) const
inline

Definition at line 156 of file G4AccVector.hh.

156{ return fVector.cbegin(); }

◆ cend()

template<class T, class Allocator = std::allocator<T>>
std::vector< T >::const_iterator G4AccVector< T, Allocator >::cend ( ) const
inline

Definition at line 160 of file G4AccVector.hh.

160{ return fVector.cend(); }

◆ clear()

template<class T, class Allocator = std::allocator<T>>
void G4AccVector< T, Allocator >::clear ( )
inline

Definition at line 162 of file G4AccVector.hh.

162{ fVector.clear(); }

◆ emplace_back() [1/2]

template<class T, class Allocator = std::allocator<T>>
template<class... Args>
T & G4AccVector< T, Allocator >::emplace_back ( Args &&... args)
inline

Definition at line 170 of file G4AccVector.hh.

170{ return fVector.emplace_back(args...); }

◆ emplace_back() [2/2]

template<class T, class Allocator = std::allocator<T>>
template<class... Args>
void G4AccVector< T, Allocator >::emplace_back ( Args &&... args)
inline

Definition at line 168 of file G4AccVector.hh.

168{ fVector.emplace_back(args...); }

◆ end() [1/2]

template<class T, class Allocator = std::allocator<T>>
std::vector< T >::iterator G4AccVector< T, Allocator >::end ( )
inline

Definition at line 158 of file G4AccVector.hh.

158{ return fVector.end(); }

◆ end() [2/2]

template<class T, class Allocator = std::allocator<T>>
std::vector< T >::const_iterator G4AccVector< T, Allocator >::end ( ) const
inline

Definition at line 159 of file G4AccVector.hh.

159{ return fVector.end(); }

◆ GetType()

template<class T, class Allocator = std::allocator<T>>
G4AccType G4AccVector< T, Allocator >::GetType ( ) const
inlinefinalvirtual

Reimplemented from G4VAccumulable.

Definition at line 181 of file G4AccVector.hh.

181{ return G4AccType::kVector; }

Referenced by GetType().

◆ GetVector() [1/2]

template<class T, class Allocator = std::allocator<T>>
std::vector< T > & G4AccVector< T, Allocator >::GetVector ( )

◆ GetVector() [2/2]

template<class T, class Allocator = std::allocator<T>>
const std::vector< T > & G4AccVector< T, Allocator >::GetVector ( ) const

◆ Merge()

template<class T, class Allocator = std::allocator<T>>
void G4AccVector< T, Allocator >::Merge ( const G4VAccumulable & other)
finalvirtual

Implements G4VAccumulable.

◆ operator[]()

template<class T, class Allocator = std::allocator<T>>
T & G4AccVector< T, Allocator >::operator[] ( typename std::vector< T >::size_type i)
inline

Definition at line 148 of file G4AccVector.hh.

148{ return fVector[i]; }

◆ pop_back()

template<class T, class Allocator = std::allocator<T>>
void G4AccVector< T, Allocator >::pop_back ( )
inline

Definition at line 172 of file G4AccVector.hh.

172{ fVector.pop_back(); }

◆ Print()

template<class T, class Allocator = std::allocator<T>>
void G4AccVector< T, Allocator >::Print ( G4PrintOptions options = G4PrintOptions()) const
finalvirtual

Reimplemented from G4VAccumulable.

Referenced by Print().

◆ push_back() [1/2]

template<class T, class Allocator = std::allocator<T>>
void G4AccVector< T, Allocator >::push_back ( const T & value)
inline

Definition at line 164 of file G4AccVector.hh.

164{ fVector.push_back(value); }

◆ push_back() [2/2]

template<class T, class Allocator = std::allocator<T>>
void G4AccVector< T, Allocator >::push_back ( T && value)
inline

Definition at line 165 of file G4AccVector.hh.

165{ fVector.push_back(std::move(value)); }

◆ Reset()

template<class T, class Allocator = std::allocator<T>>
void G4AccVector< T, Allocator >::Reset ( )
finalvirtual

Implements G4VAccumulable.

◆ SetMergeMode()

template<class T, class Allocator = std::allocator<T>>
void G4AccVector< T, Allocator >::SetMergeMode ( G4MergeMode value)
finalvirtual

Reimplemented from G4VAccumulable.

Referenced by SetMergeMode().

◆ size()

template<class T, class Allocator = std::allocator<T>>
std::vector< T >::size_type G4AccVector< T, Allocator >::size ( ) const
inline

Definition at line 152 of file G4AccVector.hh.

152{ return fVector.size(); }

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