#include <VecArray.h>
Public Types | |
using | const_iterator = const value_type * |
using | const_pointer = const value_type * |
using | const_reference = const value_type & |
using | difference_type = std::ptrdiff_t |
using | iterator = value_type * |
using | pointer = value_type * |
using | reference = value_type & |
using | size_type = unsigned int |
using | value_type = T |
Public Member Functions | |
reference | back () |
const_reference | back () const |
const_iterator | begin () const noexcept |
iterator | begin () noexcept |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
void | clear () |
pointer | data () |
const_pointer | data () const |
template<typename... Args> | |
void | emplace_back (Args &&... args) |
template<typename... Args> | |
void | emplace_back_unchecked (Args &&... args) |
constexpr bool | empty () const noexcept |
const_iterator | end () const noexcept |
iterator | end () noexcept |
reference | front () |
const_reference | front () const |
reference | operator[] (size_type pos) |
const_reference | operator[] (size_type pos) const |
void | pop_back () |
void | push_back (const T &value) |
void | push_back_unchecked (const T &value) |
void | resize (unsigned int size) |
constexpr size_type | size () const noexcept |
void | swap (VecArray &other) noexcept(noexcept(std::swap(data_, other.data_)) &&noexcept(std::swap(size_, other.size_))) |
VecArray () | |
Static Public Member Functions | |
static constexpr size_type | capacity () noexcept |
Private Attributes | |
T | data_ [N] |
unsigned int | size_ |
A class for extending std::array with std::vector-like interface.
This class can be useful if the maximum length is known at compile-time (can use std::array), and that the length is rather small (maximum size of std::array is comparable with the overhead of std::vector). It is also free of dynamic memory allocations.
Note that the implemented interface is not complete compared to std::array or std:vector. Feel free contribute if further needs arise.
The second template argument is unsigned int (not size_t) on purpose to reduce the size of the class by 4 bytes (at least in Linux amd64). For all practical purposes even unsigned char could be enough.
Definition at line 28 of file VecArray.h.
using edm::VecArray< T, N >::const_iterator = const value_type* |
Definition at line 41 of file VecArray.h.
using edm::VecArray< T, N >::const_pointer = const value_type* |
Definition at line 39 of file VecArray.h.
using edm::VecArray< T, N >::const_reference = const value_type& |
Definition at line 37 of file VecArray.h.
using edm::VecArray< T, N >::difference_type = std::ptrdiff_t |
Definition at line 35 of file VecArray.h.
using edm::VecArray< T, N >::iterator = value_type* |
Definition at line 40 of file VecArray.h.
using edm::VecArray< T, N >::pointer = value_type* |
Definition at line 38 of file VecArray.h.
using edm::VecArray< T, N >::reference = value_type& |
Definition at line 36 of file VecArray.h.
using edm::VecArray< T, N >::size_type = unsigned int |
Definition at line 34 of file VecArray.h.
using edm::VecArray< T, N >::value_type = T |
Definition at line 33 of file VecArray.h.
|
inline |
Definition at line 43 of file VecArray.h.
|
inline |
Definition at line 55 of file VecArray.h.
|
inline |
Definition at line 57 of file VecArray.h.
|
inlinenoexcept |
Definition at line 62 of file VecArray.h.
|
inlinenoexcept |
Definition at line 61 of file VecArray.h.
Referenced by edm::VecArray< std::pair< int, int >, 9 >::end().
|
inlinestaticconstexprnoexcept |
|
inlinenoexcept |
Definition at line 63 of file VecArray.h.
Referenced by edm::VecArray< std::pair< int, int >, 9 >::cend().
|
inlinenoexcept |
Definition at line 67 of file VecArray.h.
|
inline |
|
inline |
Definition at line 58 of file VecArray.h.
|
inline |
Definition at line 59 of file VecArray.h.
|
inline |
Definition at line 90 of file VecArray.h.
Referenced by ClusterTPAssociation::addKeyID(), PixelInactiveAreaFinder::InactiveAreas::areasAndLayerSets(), and PixelInactiveAreaFinder::InactiveAreas::spansAndLayerSets().
|
inline |
Definition at line 98 of file VecArray.h.
Referenced by edm::VecArray< std::pair< int, int >, 9 >::emplace_back().
|
inlineconstexprnoexcept |
Definition at line 69 of file VecArray.h.
|
inlinenoexcept |
Definition at line 66 of file VecArray.h.
|
inlinenoexcept |
Definition at line 65 of file VecArray.h.
|
inline |
|
inline |
Definition at line 52 of file VecArray.h.
|
inline |
Definition at line 46 of file VecArray.h.
|
inline |
Definition at line 48 of file VecArray.h.
|
inline |
Definition at line 104 of file VecArray.h.
Referenced by edm::VecArray< std::pair< int, int >, 9 >::resize().
|
inline |
Definition at line 76 of file VecArray.h.
|
inline |
Definition at line 83 of file VecArray.h.
Referenced by ClusterShapeHitFilter::getSizes(), and edm::VecArray< std::pair< int, int >, 9 >::push_back().
|
inline |
|
inlineconstexprnoexcept |
Definition at line 70 of file VecArray.h.
Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), ClusterTPAssociation::checkKeyProductID(), PixelClusterShapeExtractor::processRec(), and edm::VecArray< std::pair< int, int >, 9 >::resize().
|
private |
Definition at line 29 of file VecArray.h.
Referenced by edm::VecArray< std::pair< int, int >, 9 >::back(), edm::VecArray< std::pair< int, int >, 9 >::begin(), edm::VecArray< std::pair< int, int >, 9 >::cbegin(), edm::VecArray< std::pair< int, int >, 9 >::data(), edm::VecArray< std::pair< int, int >, 9 >::emplace_back_unchecked(), edm::VecArray< std::pair< int, int >, 9 >::front(), edm::VecArray< std::pair< int, int >, 9 >::operator[](), edm::VecArray< std::pair< int, int >, 9 >::push_back_unchecked(), and edm::VecArray< std::pair< int, int >, 9 >::swap().
|
private |
Definition at line 30 of file VecArray.h.
Referenced by edm::VecArray< std::pair< int, int >, 9 >::back(), edm::VecArray< std::pair< int, int >, 9 >::cend(), edm::VecArray< std::pair< int, int >, 9 >::clear(), edm::VecArray< std::pair< int, int >, 9 >::emplace_back(), edm::VecArray< std::pair< int, int >, 9 >::emplace_back_unchecked(), edm::VecArray< std::pair< int, int >, 9 >::empty(), edm::VecArray< std::pair< int, int >, 9 >::end(), edm::VecArray< std::pair< int, int >, 9 >::pop_back(), edm::VecArray< std::pair< int, int >, 9 >::push_back(), edm::VecArray< std::pair< int, int >, 9 >::push_back_unchecked(), edm::VecArray< std::pair< int, int >, 9 >::resize(), edm::VecArray< std::pair< int, int >, 9 >::size(), and edm::VecArray< std::pair< int, int >, 9 >::swap().