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 78 of file RowView.h.

Member Typedef Documentation

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

Definition at line 79 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 83 of file RowView.h.

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

Member Function Documentation

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

Definition at line 102 of file RowView.h.

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

102  {
104  }
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:80
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 106 of file RowView.h.

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

106  {
108  }
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:80
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 122 of file RowView.h.

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

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

Definition at line 112 of file RowView.h.

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

Definition at line 116 of file RowView.h.

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

116  {
117  copyValuesUsingFiller<0>(iFiller, iObj, m_values);
118  }
std::array< void *, sizeof...(Args)> m_values
Definition: RowView.h:80
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 133 of file RowView.h.

References constexpr, and Exhume::I.

133  {
134  if constexpr(I < sizeof...(Args)) {
135  using Layout = std::tuple<Args...>;
136  using ColumnType = typename std::tuple_element<I,Layout>::type;
137  using Type = typename ColumnType::type;
138  Type* pElement = static_cast<Type*>(oValues[I]);
139  *pElement = iFiller.value(iItem, static_cast<ColumnType*>(nullptr));
140  copyValuesUsingFiller<I+1>(iFiller,iItem, oValues);
141  }
142  }
type
Definition: HCALResponse.h:21
#define constexpr
const std::complex< double > I
Definition: I.h:8
std::tuple< Args... > Layout
Definition: RowView.h:79
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 96 of file RowView.h.

96  {
97  get<U>() = iValue;
98  return *this;
99  }

Member Data Documentation

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

Definition at line 80 of file RowView.h.