CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
edm::soa::MutableRowView< Args > Class Template Reference

#include <RowView.h>

Public Member Functions

template<typename U >
void * columnAddress ()
 
template<typename U >
void const * columnAddress () const
 
template<typename O >
void copyValuesFrom (O const &iObj)
 
template<typename O , typename... CArgs>
void copyValuesFrom (O const &iObj, ColumnFillers< CArgs... > iFiller)
 
template<typename U >
U::typeget ()
 
template<typename U >
U::type const & get () const
 
 MutableRowView (std::array< void *, sizeof...(Args)> &iValues)
 
template<typename U >
MutableRowView< Args... > & set (typename U::type const &iValue)
 

Private Types

using Layout = std::tuple< Args... >
 

Private Member Functions

template<int I, typename O >
void copyValueFromImpl (O const &iObj)
 

Static Private Member Functions

template<int I, typename E , typename F >
static void copyValuesUsingFiller (F &iFiller, E const &iItem, std::array< void *, sizeof...(Args)> &oValues)
 

Private Attributes

std::array< void *, sizeof...(Args)> m_values
 

Detailed Description

template<typename... Args>
class edm::soa::MutableRowView< Args >

Definition at line 76 of file RowView.h.

Member Typedef Documentation

template<typename... Args>
using edm::soa::MutableRowView< Args >::Layout = std::tuple<Args...>
private

Definition at line 77 of file RowView.h.

Constructor & Destructor Documentation

template<typename... Args>
edm::soa::MutableRowView< Args >::MutableRowView ( std::array< void *, sizeof...(Args)> &  iValues)
inlineexplicit

Definition at line 81 of file RowView.h.

81 : m_values{iValues} {}
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:78

Member Function Documentation

template<typename... Args>
template<typename U >
void* edm::soa::MutableRowView< Args >::columnAddress ( )
inline

Definition at line 99 of file RowView.h.

References edm::soa::RowView< Args >::m_values.

99  {
101  }
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:78
static constexpr int index
Definition: tablehelpers.h:39
template<typename... Args>
template<typename U >
void const* edm::soa::MutableRowView< Args >::columnAddress ( ) const
inline

Definition at line 103 of file RowView.h.

References edm::soa::RowView< Args >::m_values.

103  {
105  }
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:78
static constexpr int index
Definition: tablehelpers.h:39
template<typename... Args>
template<int I, typename O >
void edm::soa::MutableRowView< Args >::copyValueFromImpl ( O const &  iObj)
inlineprivate

Definition at line 118 of file RowView.h.

References constexpr, Exhume::I, and edm::soa::RowView< Args >::m_values.

118  {
119  if constexpr (I < sizeof...(Args)) {
120  using ColumnType = typename std::tuple_element<I, Layout>::type;
121  using Type = typename ColumnType::type;
122  auto ptr = static_cast<Type*>(m_values[I]);
123  *ptr = value_for_column(iObj, static_cast<ColumnType*>(nullptr));
124  copyValueFromImpl<I + 1>(iObj);
125  }
126  }
type
Definition: HCALResponse.h:21
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:78
const std::complex< double > I
Definition: I.h:8
#define constexpr
template<typename... Args>
template<typename O >
void edm::soa::MutableRowView< Args >::copyValuesFrom ( O const &  iObj)
inline

Definition at line 108 of file RowView.h.

108  {
109  copyValueFromImpl<0>(iObj);
110  }
template<typename... Args>
template<typename O , typename... CArgs>
void edm::soa::MutableRowView< Args >::copyValuesFrom ( O const &  iObj,
ColumnFillers< CArgs... >  iFiller 
)
inline

Definition at line 112 of file RowView.h.

References edm::soa::RowView< Args >::m_values.

112  {
113  copyValuesUsingFiller<0>(iFiller, iObj, m_values);
114  }
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:78
template<typename... Args>
template<int I, typename E , typename F >
static void edm::soa::MutableRowView< Args >::copyValuesUsingFiller ( F iFiller,
E const &  iItem,
std::array< void *, sizeof...(Args)> &  oValues 
)
inlinestaticprivate

Definition at line 129 of file RowView.h.

References constexpr, and Exhume::I.

129  {
130  if constexpr (I < sizeof...(Args)) {
131  using Layout = std::tuple<Args...>;
132  using ColumnType = typename std::tuple_element<I, Layout>::type;
133  using Type = typename ColumnType::type;
134  Type* pElement = static_cast<Type*>(oValues[I]);
135  *pElement = iFiller.value(iItem, static_cast<ColumnType*>(nullptr));
136  copyValuesUsingFiller<I + 1>(iFiller, iItem, oValues);
137  }
138  }
type
Definition: HCALResponse.h:21
const std::complex< double > I
Definition: I.h:8
std::tuple< Args... > Layout
Definition: RowView.h:77
#define constexpr
template<typename... Args>
template<typename U >
U::type& edm::soa::MutableRowView< Args >::get ( )
inline
template<typename... Args>
template<typename U >
U::type const& edm::soa::MutableRowView< Args >::get ( ) const
inline
template<typename... Args>
template<typename U >
MutableRowView<Args...>& edm::soa::MutableRowView< Args >::set ( typename U::type const &  iValue)
inline

Definition at line 93 of file RowView.h.

93  {
94  get<U>() = iValue;
95  return *this;
96  }

Member Data Documentation

template<typename... Args>
std::array<void*, sizeof...(Args)> edm::soa::MutableRowView< Args >::m_values
private

Definition at line 78 of file RowView.h.