Public Types | Public Member Functions | Protected Attributes | List of all members
dune::AnalysisTreeDataStruct::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::AnalysisTreeDataStruct::BoxedArray< Array_t >

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

Definition at line 139 of file AnalysisTree_module.cc.

Member Typedef Documentation

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

Definition at line 145 of file AnalysisTree_module.cc.

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

Definition at line 144 of file AnalysisTree_module.cc.

Constructor & Destructor Documentation

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

Definition at line 147 of file AnalysisTree_module.cc.

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

Definition at line 148 of file AnalysisTree_module.cc.

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

Member Function Documentation

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

Definition at line 157 of file AnalysisTree_module.cc.

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

Definition at line 158 of file AnalysisTree_module.cc.

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

Definition at line 151 of file AnalysisTree_module.cc.

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

Definition at line 152 of file AnalysisTree_module.cc.

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

Definition at line 159 of file AnalysisTree_module.cc.

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

Definition at line 160 of file AnalysisTree_module.cc.

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

Definition at line 171 of file AnalysisTree_module.cc.

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

Definition at line 172 of file AnalysisTree_module.cc.

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

Array interface.

Definition at line 165 of file AnalysisTree_module.cc.

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

begin/end interface

Definition at line 156 of file AnalysisTree_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::AnalysisTreeDataStruct::BoxedArray< Array_t >::array
protected

Definition at line 141 of file AnalysisTree_module.cc.

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

Definition at line 174 of file AnalysisTree_module.cc.


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