Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Detail::VecOps::RVecImpl< T > Class Template Reference

template<typename T>
class ROOT::Detail::VecOps::RVecImpl< T >

This class consists of common code factored out of the SmallVector class to reduce code duplication based on the SmallVector 'N' template parameter.

Definition at line 558 of file RVec.hxx.

Public Types

using const_iterator = typename SuperClass::const_iterator
 
using iterator = typename SuperClass::iterator
 
using reference = typename SuperClass::reference
 
using size_type = typename SuperClass::size_type
 
- Public Types inherited from ROOT::Internal::VecOps::SmallVectorTemplateCommon< T >
using const_iterator = const T *
 
using const_pointer = const T *
 
using const_reference = const T &
 
using const_reverse_iterator = std::reverse_iterator<const_iterator>
 
using difference_type = ptrdiff_t
 
using iterator = T *
 
using pointer = T *
 
using reference = T &
 
using reverse_iterator = std::reverse_iterator<iterator>
 
using size_type = size_t
 
using value_type = T
 
- Public Types inherited from ROOT::Internal::VecOps::SmallVectorBase
using Size_T = int32_t
 

Public Member Functions

 RVecImpl (const RVecImpl &)=delete
 
 ~RVecImpl ()
 
template<typename in_iter , typename = typename std::enable_if<std::is_convertible< typename std::iterator_traits<in_iter>::iterator_category, std::input_iterator_tag>::value>::type>
void append (in_iter in_start, in_iter in_end)
 Add the specified range to the end of the SmallVector.
 
void append (size_type NumInputs, const T &Elt)
 Append NumInputs copies of Elt to the end.
 
void append (std::initializer_list< T > IL)
 
template<typename in_iter , typename = typename std::enable_if<std::is_convertible< typename std::iterator_traits<in_iter>::iterator_category, std::input_iterator_tag>::value>::type>
void assign (in_iter in_start, in_iter in_end)
 
void assign (size_type NumElts, const T &Elt)
 
void assign (std::initializer_list< T > IL)
 
void clear ()
 
template<typename... ArgTypes>
reference emplace_back (ArgTypes &&...Args)
 
iterator erase (const_iterator CI)
 
iterator erase (const_iterator CS, const_iterator CE)
 
iterator insert (iterator I, const T &Elt)
 
template<typename ItTy , typename = typename std::enable_if<std::is_convertible< typename std::iterator_traits<ItTy>::iterator_category, std::input_iterator_tag>::value>::type>
iterator insert (iterator I, ItTy From, ItTy To)
 
iterator insert (iterator I, size_type NumToInsert, const T &Elt)
 
void insert (iterator I, std::initializer_list< T > IL)
 
iterator insert (iterator I, T &&Elt)
 
RVecImploperator= (const RVecImpl &RHS)
 
RVecImploperator= (RVecImpl &&RHS)
 
void pop_back_n (size_type NumItems)
 
pop_back_val ()
 
void reserve (size_type N)
 
void resize (size_type N)
 
void resize (size_type N, const T &NV)
 
void swap (RVecImpl &RHS)
 
- Public Member Functions inherited from ROOT::Internal::VecOps::SmallVectorTemplateBase< T, bool >
void pop_back ()
 
void push_back (const T &Elt)
 
void push_back (T &&Elt)
 
- Public Member Functions inherited from ROOT::Internal::VecOps::SmallVectorTemplateCommon< T >
reference back ()
 
const_reference back () const
 
const_iterator begin () const noexcept
 
iterator begin () noexcept
 
size_t capacity () const noexcept
 
size_t capacity_in_bytes () const
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator crend () const noexcept
 
const_pointer data () const noexcept
 Return a pointer to the vector's buffer, even if empty().
 
pointer data () noexcept
 Return a pointer to the vector's buffer, even if empty().
 
bool empty () const
 
const_iterator end () const noexcept
 
iterator end () noexcept
 
reference front ()
 
const_reference front () const
 
size_type max_size () const noexcept
 
const_reverse_iterator rbegin () const noexcept
 
reverse_iterator rbegin () noexcept
 
const_reverse_iterator rend () const noexcept
 
reverse_iterator rend () noexcept
 
size_t size () const
 
size_type size_in_bytes () const
 
- Public Member Functions inherited from ROOT::Internal::VecOps::SmallVectorBase
size_t capacity () const noexcept
 
bool empty () const
 
void set_size (size_t N)
 Set the array size to N, which the current array must have enough capacity for.
 
size_t size () const
 

Protected Member Functions

 RVecImpl (unsigned N)
 
- Protected Member Functions inherited from ROOT::Internal::VecOps::SmallVectorTemplateBase< T, bool >
 SmallVectorTemplateBase (size_t Size)
 
void grow (size_t MinSize=0)
 Grow the allocated memory (without initializing new elements), doubling the size of the allocated memory.
 
- Protected Member Functions inherited from ROOT::Internal::VecOps::SmallVectorTemplateCommon< T >
 SmallVectorTemplateCommon (size_t Size)
 
void grow_pod (size_t MinSize, size_t TSize)
 
bool isSmall () const
 Return true if this is a smallvector which has not had dynamic memory allocated for it.
 
void resetToSmall ()
 Put this vector in a state of being small.
 
- Protected Member Functions inherited from ROOT::Internal::VecOps::SmallVectorBase
 SmallVectorBase ()=delete
 
 SmallVectorBase (void *FirstEl, size_t TotalCapacity)
 
void grow_pod (void *FirstEl, size_t MinSize, size_t TSize)
 This is an implementation of the grow() method which only works on POD-like data types and is out of line to reduce code duplication.
 
bool Owns () const
 If false, the RVec is in "memory adoption" mode, i.e. it is acting as a view on a memory buffer it does not own.
 

Private Types

using SuperClass = Internal::VecOps::SmallVectorTemplateBase<T>
 

Additional Inherited Members

- Static Protected Member Functions inherited from ROOT::Internal::VecOps::SmallVectorTemplateBase< T, bool >
static void destroy_range (T *S, T *E)
 
template<typename It1 , typename It2 >
static void uninitialized_copy (It1 I, It1 E, It2 Dest)
 Copy the range [I, E) onto the uninitialized memory starting with "Dest", constructing elements as needed.
 
template<typename It1 , typename It2 >
static void uninitialized_move (It1 I, It1 E, It2 Dest)
 Move the range [I, E) into the uninitialized memory starting with "Dest", constructing elements as needed.
 
- Static Protected Member Functions inherited from ROOT::Internal::VecOps::SmallVectorBase
static void report_at_maximum_capacity ()
 Report that this vector is already at maximum capacity.
 
static void report_size_overflow (size_t MinSize)
 Report that MinSize doesn't fit into this vector's size type.
 
static constexpr size_t SizeTypeMax ()
 The maximum value of the Size_T used.
 
- Protected Attributes inherited from ROOT::Internal::VecOps::SmallVectorBase
voidfBeginX
 
Size_T fCapacity
 Always >= -1. fCapacity == -1 indicates the RVec is in "memory adoption" mode.
 
Size_T fSize = 0
 Always >= 0.
 

#include <ROOT/RVec.hxx>

Inheritance diagram for ROOT::Detail::VecOps::RVecImpl< T >:
[legend]

Member Typedef Documentation

◆ const_iterator

Definition at line 563 of file RVec.hxx.

◆ iterator

Definition at line 562 of file RVec.hxx.

◆ reference

Definition at line 564 of file RVec.hxx.

◆ size_type

Definition at line 565 of file RVec.hxx.

◆ SuperClass

Definition at line 559 of file RVec.hxx.

Constructor & Destructor Documentation

◆ RVecImpl() [1/2]

template<typename T >
ROOT::Detail::VecOps::RVecImpl< T >::RVecImpl ( unsigned N)
inlineexplicitprotected

Definition at line 569 of file RVec.hxx.

◆ RVecImpl() [2/2]

template<typename T >
ROOT::Detail::VecOps::RVecImpl< T >::RVecImpl ( const RVecImpl< T > & )
delete

◆ ~RVecImpl()

template<typename T >
ROOT::Detail::VecOps::RVecImpl< T >::~RVecImpl ( )
inline

Definition at line 574 of file RVec.hxx.

Member Function Documentation

◆ append() [1/3]

template<typename T >
template<typename in_iter , typename = typename std::enable_if<std::is_convertible< typename std::iterator_traits<in_iter>::iterator_category, std::input_iterator_tag>::value>::type>
void ROOT::Detail::VecOps::RVecImpl< T >::append ( in_iter in_start,
in_iter in_end )
inline

Add the specified range to the end of the SmallVector.

Definition at line 651 of file RVec.hxx.

◆ append() [2/3]

template<typename T >
void ROOT::Detail::VecOps::RVecImpl< T >::append ( size_type NumInputs,
const T & Elt )
inline

Append NumInputs copies of Elt to the end.

Definition at line 662 of file RVec.hxx.

◆ append() [3/3]

template<typename T >
void ROOT::Detail::VecOps::RVecImpl< T >::append ( std::initializer_list< T > IL)
inline

Definition at line 671 of file RVec.hxx.

◆ assign() [1/3]

template<typename T >
template<typename in_iter , typename = typename std::enable_if<std::is_convertible< typename std::iterator_traits<in_iter>::iterator_category, std::input_iterator_tag>::value>::type>
void ROOT::Detail::VecOps::RVecImpl< T >::assign ( in_iter in_start,
in_iter in_end )
inline

Definition at line 689 of file RVec.hxx.

◆ assign() [2/3]

template<typename T >
void ROOT::Detail::VecOps::RVecImpl< T >::assign ( size_type NumElts,
const T & Elt )
inline

Definition at line 677 of file RVec.hxx.

◆ assign() [3/3]

template<typename T >
void ROOT::Detail::VecOps::RVecImpl< T >::assign ( std::initializer_list< T > IL)
inline

Definition at line 695 of file RVec.hxx.

◆ clear()

template<typename T >
void ROOT::Detail::VecOps::RVecImpl< T >::clear ( )
inline

Definition at line 583 of file RVec.hxx.

◆ emplace_back()

template<typename T >
template<typename... ArgTypes>
reference ROOT::Detail::VecOps::RVecImpl< T >::emplace_back ( ArgTypes &&... Args)
inline

Definition at line 917 of file RVec.hxx.

◆ erase() [1/2]

template<typename T >
iterator ROOT::Detail::VecOps::RVecImpl< T >::erase ( const_iterator CI)
inline

Definition at line 701 of file RVec.hxx.

◆ erase() [2/2]

template<typename T >
iterator ROOT::Detail::VecOps::RVecImpl< T >::erase ( const_iterator CS,
const_iterator CE )
inline

Definition at line 718 of file RVec.hxx.

◆ insert() [1/5]

template<typename T >
iterator ROOT::Detail::VecOps::RVecImpl< T >::insert ( iterator I,
const T & Elt )
inline

Definition at line 770 of file RVec.hxx.

◆ insert() [2/5]

template<typename T >
template<typename ItTy , typename = typename std::enable_if<std::is_convertible< typename std::iterator_traits<ItTy>::iterator_category, std::input_iterator_tag>::value>::type>
iterator ROOT::Detail::VecOps::RVecImpl< T >::insert ( iterator I,
ItTy From,
ItTy To )
inline

Definition at line 856 of file RVec.hxx.

◆ insert() [3/5]

template<typename T >
iterator ROOT::Detail::VecOps::RVecImpl< T >::insert ( iterator I,
size_type NumToInsert,
const T & Elt )
inline

Definition at line 801 of file RVec.hxx.

◆ insert() [4/5]

template<typename T >
void ROOT::Detail::VecOps::RVecImpl< T >::insert ( iterator I,
std::initializer_list< T > IL )
inline

Definition at line 914 of file RVec.hxx.

◆ insert() [5/5]

template<typename T >
iterator ROOT::Detail::VecOps::RVecImpl< T >::insert ( iterator I,
T && Elt )
inline

Definition at line 738 of file RVec.hxx.

◆ operator=() [1/2]

template<typename T >
RVecImpl< T > & ROOT::Detail::VecOps::RVecImpl< T >::operator= ( const RVecImpl< T > & RHS)

Definition at line 992 of file RVec.hxx.

◆ operator=() [2/2]

template<typename T >
RVecImpl< T > & ROOT::Detail::VecOps::RVecImpl< T >::operator= ( RVecImpl< T > && RHS)

Definition at line 1045 of file RVec.hxx.

◆ pop_back_n()

template<typename T >
void ROOT::Detail::VecOps::RVecImpl< T >::pop_back_n ( size_type NumItems)
inline

Definition at line 628 of file RVec.hxx.

◆ pop_back_val()

template<typename T >
T ROOT::Detail::VecOps::RVecImpl< T >::pop_back_val ( )
inline

Definition at line 638 of file RVec.hxx.

◆ reserve()

template<typename T >
void ROOT::Detail::VecOps::RVecImpl< T >::reserve ( size_type N)
inline

Definition at line 622 of file RVec.hxx.

◆ resize() [1/2]

template<typename T >
void ROOT::Detail::VecOps::RVecImpl< T >::resize ( size_type N)
inline

Definition at line 593 of file RVec.hxx.

◆ resize() [2/2]

template<typename T >
void ROOT::Detail::VecOps::RVecImpl< T >::resize ( size_type N,
const T & NV )
inline

Definition at line 608 of file RVec.hxx.

◆ swap()

template<typename T >
void ROOT::Detail::VecOps::RVecImpl< T >::swap ( RVecImpl< T > & RHS)

Definition at line 932 of file RVec.hxx.

  • math/vecops/inc/ROOT/RVec.hxx