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, std::true_type)
 
template<int I, typename O >
void copyValueFromImpl (O const &iObj, std::false_type)
 

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, std::true_type)
 
template<int I, typename E , typename F >
static void copyValuesUsingFiller (F &, E const &, std::array< void *, sizeof...(Args)> &oValues, std::false_type)
 

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,
std::true_type   
)
inlineprivate

Definition at line 122 of file RowView.h.

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

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

Definition at line 130 of file RowView.h.

130  {
131  }
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, std::true_type{});
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, std::true_type{});
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,
std::true_type   
)
inlinestaticprivate

Definition at line 134 of file RowView.h.

References Exhume::I.

134  {
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, std::conditional_t<I+1==sizeof...(Args),
141  std::false_type,
142  std::true_type>{});
143  }
type
Definition: HCALResponse.h:21
const std::complex< double > I
Definition: I.h:8
std::tuple< Args... > Layout
Definition: RowView.h:79
template<typename... Args>
template<int I, typename E , typename F >
static void edm::soa::MutableRowView< Args >::copyValuesUsingFiller ( F ,
E const &  ,
std::array< void *, sizeof...(Args)> &  oValues,
std::false_type   
)
inlinestaticprivate

Definition at line 145 of file RowView.h.

145 {}
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.