Public Types | Public Member Functions | Protected Attributes | List of all members
dune::AnaRootParserDataStruct::BoxedArray< Array_t > Class Template Reference

A wrapper to a C array (needed to embed an array into a vector) More...

Public Types

using This_t = BoxedArray< Array_t >
 
typedef std::remove_all_extents< Array_t >::type Data_t
 

Public Member Functions

 BoxedArray ()
 
 BoxedArray (const This_t &from)
 
Array_t & data ()
 
const Array_t & data () const
 

Protected Attributes

Array_t array
 
Data_tbegin ()
 
const Data_tbegin () const
 
Data_tend ()
 
const Data_tend () const
 
static constexpr size_t size ()
 begin/end interface More...
 
operator decltype(&[0]) array ()
 
auto operator[] (size_t index) -> decltype(*array)
 Array interface. More...
 
auto operator[] (size_t index) const -> decltype(*array)
 
auto operator+ (ptrdiff_t index) -> decltype(&*array)
 
auto operator+ (ptrdiff_t index) const -> decltype(&*array)
 
auto operator- (ptrdiff_t index) -> decltype(&*array)
 
auto operator- (ptrdiff_t index) const -> decltype(&*array)
 
auto operator* () -> decltype(*array)
 
auto operator* () const -> decltype(*array)
 

Detailed Description

template<typename Array_t>
class dune::AnaRootParserDataStruct::BoxedArray< Array_t >

A wrapper to a C array (needed to embed an array into a vector)

Definition at line 118 of file AnaRootParser_module.cc.

Member Typedef Documentation

template<typename Array_t >
typedef std::remove_all_extents<Array_t>::type dune::AnaRootParserDataStruct::BoxedArray< Array_t >::Data_t

Definition at line 124 of file AnaRootParser_module.cc.

template<typename Array_t >
using dune::AnaRootParserDataStruct::BoxedArray< Array_t >::This_t = BoxedArray<Array_t>

Definition at line 123 of file AnaRootParser_module.cc.

Constructor & Destructor Documentation

template<typename Array_t >
dune::AnaRootParserDataStruct::BoxedArray< Array_t >::BoxedArray ( )
inline

Definition at line 126 of file AnaRootParser_module.cc.

126 {} // no initialization
template<typename Array_t >
dune::AnaRootParserDataStruct::BoxedArray< Array_t >::BoxedArray ( const This_t from)
inline

Definition at line 127 of file AnaRootParser_module.cc.

128  { std::memcpy((char*) &(data()), (char*) &(from.data()), sizeof(Array_t)); }

Member Function Documentation

template<typename Array_t >
Data_t* dune::AnaRootParserDataStruct::BoxedArray< Array_t >::begin ( )
inline

Definition at line 136 of file AnaRootParser_module.cc.

136 { return reinterpret_cast<Data_t*>(&array); }
std::remove_all_extents< Array_t >::type Data_t
template<typename Array_t >
const Data_t* dune::AnaRootParserDataStruct::BoxedArray< Array_t >::begin ( ) const
inline

Definition at line 137 of file AnaRootParser_module.cc.

137 { return reinterpret_cast<const Data_t*>(&array); }
std::remove_all_extents< Array_t >::type Data_t
template<typename Array_t >
Array_t& dune::AnaRootParserDataStruct::BoxedArray< Array_t >::data ( )
inline

Definition at line 130 of file AnaRootParser_module.cc.

template<typename Array_t >
const Array_t& dune::AnaRootParserDataStruct::BoxedArray< Array_t >::data ( ) const
inline

Definition at line 131 of file AnaRootParser_module.cc.

template<typename Array_t >
Data_t* dune::AnaRootParserDataStruct::BoxedArray< Array_t >::end ( )
inline

Definition at line 138 of file AnaRootParser_module.cc.

138 { return begin() + size(); }
static constexpr size_t size()
begin/end interface
template<typename Array_t >
const Data_t* dune::AnaRootParserDataStruct::BoxedArray< Array_t >::end ( ) const
inline

Definition at line 139 of file AnaRootParser_module.cc.

139 { return begin() + size(); }
static constexpr size_t size()
begin/end interface
template<typename Array_t >
auto dune::AnaRootParserDataStruct::BoxedArray< Array_t >::operator* ( ) -> decltype(*array)
inline

Definition at line 150 of file AnaRootParser_module.cc.

template<typename Array_t >
auto dune::AnaRootParserDataStruct::BoxedArray< Array_t >::operator* ( ) const -> decltype(*array)
inline

Definition at line 151 of file AnaRootParser_module.cc.

template<typename Array_t >
auto dune::AnaRootParserDataStruct::BoxedArray< Array_t >::operator+ ( ptrdiff_t  index) -> decltype(&*array)
inline
template<typename Array_t >
auto dune::AnaRootParserDataStruct::BoxedArray< Array_t >::operator+ ( ptrdiff_t  index) const -> decltype(&*array)
inline
template<typename Array_t >
auto dune::AnaRootParserDataStruct::BoxedArray< Array_t >::operator- ( ptrdiff_t  index) -> decltype(&*array)
inline
template<typename Array_t >
auto dune::AnaRootParserDataStruct::BoxedArray< Array_t >::operator- ( ptrdiff_t  index) const -> decltype(&*array)
inline
template<typename Array_t >
auto dune::AnaRootParserDataStruct::BoxedArray< Array_t >::operator[] ( size_t  index) -> decltype(*array)
inline

Array interface.

Definition at line 144 of file AnaRootParser_module.cc.

template<typename Array_t >
auto dune::AnaRootParserDataStruct::BoxedArray< Array_t >::operator[] ( size_t  index) const -> decltype(*array)
inline
template<typename Array_t >
static constexpr size_t dune::AnaRootParserDataStruct::BoxedArray< Array_t >::size ( )
inlinestatic

begin/end interface

Definition at line 135 of file AnaRootParser_module.cc.

total_extent<T>::value has the total number of elements of an array

Member Data Documentation

template<typename Array_t >
Array_t dune::AnaRootParserDataStruct::BoxedArray< Array_t >::array
protected

Definition at line 120 of file AnaRootParser_module.cc.

template<typename Array_t >
operator decltype(&[0]) dune::AnaRootParserDataStruct::BoxedArray< Array_t >::array() const
inline

Definition at line 153 of file AnaRootParser_module.cc.


The documentation for this class was generated from the following file: