All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
proxy::details::ParallelData< AuxColl, Aux, Tag > Class Template Reference

Object to draft parallel data interface. More...

#include <ParallelData.h>

Public Types

using tag = Tag
 Tag of this association proxy. More...
 
using auxiliary_data_t = decltype(util::makeTagged< tag >(std::declval< aux_element_t >()))
 Type returned when accessing auxiliary data. More...
 

Public Member Functions

 ParallelData (parallel_data_t const &data)
 Constructor: points to the specified data collection. More...
 
auto begin () const -> decltype(auto)
 Returns an iterator pointing to the first data element. More...
 
auto end () const -> decltype(auto)
 Returns an iterator pointing past the last data element. More...
 
auto operator[] (std::size_t index) const -> decltype(auto)
 Returns the element with the specified index (no check performed). More...
 
parallel_data_t const * data () const
 Returns a pointer to the whole data collection. More...
 
parallel_data_t const & dataRef () const
 Returns a reference to the whole data collection. More...
 

Static Public Member Functions

template<typename TestTag >
static constexpr bool hasTag ()
 Returns whether this data is labeled with the specified tag. More...
 

Private Types

using This_t = ParallelData< AuxColl, Aux, Tag >
 This type. More...
 
using parallel_data_t = AuxColl
 Type of auxiliary collection. More...
 
using aux_t = Aux
 Type of the value of auxiliary collection element. More...
 
using aux_element_t = util::collection_value_constant_access_t< AuxColl >
 Type returned when accessing an auxiliary collection element. More...
 
using parallel_data_iterator_t = typename parallel_data_t::const_iterator
 

Private Member Functions

auto getElement (std::size_t index) const -> decltype(auto)
 

Private Attributes

parallel_data_t const * fData
 Reference to the original data product. More...
 

Detailed Description

template<typename AuxColl, typename Aux, typename Tag>
class proxy::details::ParallelData< AuxColl, Aux, Tag >

Object to draft parallel data interface.

Template Parameters
AuxColltype of the parallel data collection
Auxtype of the associated object
Tagtag this data is labeled with

Allows:

Construction is not part of the interface.

Definition at line 82 of file ParallelData.h.

Member Typedef Documentation

template<typename AuxColl, typename Aux, typename Tag>
using proxy::details::ParallelData< AuxColl, Aux, Tag >::aux_element_t = util::collection_value_constant_access_t<AuxColl>
private

Type returned when accessing an auxiliary collection element.

Definition at line 92 of file ParallelData.h.

template<typename AuxColl, typename Aux, typename Tag>
using proxy::details::ParallelData< AuxColl, Aux, Tag >::aux_t = Aux
private

Type of the value of auxiliary collection element.

Definition at line 89 of file ParallelData.h.

template<typename AuxColl, typename Aux, typename Tag>
using proxy::details::ParallelData< AuxColl, Aux, Tag >::auxiliary_data_t = decltype(util::makeTagged<tag>(std::declval<aux_element_t>()))

Type returned when accessing auxiliary data.

Definition at line 101 of file ParallelData.h.

template<typename AuxColl, typename Aux, typename Tag>
using proxy::details::ParallelData< AuxColl, Aux, Tag >::parallel_data_iterator_t = typename parallel_data_t::const_iterator
private

Definition at line 94 of file ParallelData.h.

template<typename AuxColl, typename Aux, typename Tag>
using proxy::details::ParallelData< AuxColl, Aux, Tag >::parallel_data_t = AuxColl
private

Type of auxiliary collection.

Definition at line 86 of file ParallelData.h.

template<typename AuxColl, typename Aux, typename Tag>
using proxy::details::ParallelData< AuxColl, Aux, Tag >::tag = Tag

Tag of this association proxy.

Definition at line 97 of file ParallelData.h.

template<typename AuxColl, typename Aux, typename Tag>
using proxy::details::ParallelData< AuxColl, Aux, Tag >::This_t = ParallelData<AuxColl, Aux, Tag>
private

This type.

Definition at line 83 of file ParallelData.h.

Constructor & Destructor Documentation

template<typename AuxColl, typename Aux, typename Tag>
proxy::details::ParallelData< AuxColl, Aux, Tag >::ParallelData ( parallel_data_t const &  data)
inline

Constructor: points to the specified data collection.

Definition at line 104 of file ParallelData.h.

105  : fData(&data)
106  {}
parallel_data_t const * data() const
Returns a pointer to the whole data collection.
Definition: ParallelData.h:131
parallel_data_t const * fData
Reference to the original data product.
Definition: ParallelData.h:138

Member Function Documentation

template<typename AuxColl, typename Aux, typename Tag>
auto proxy::details::ParallelData< AuxColl, Aux, Tag >::begin ( ) const -> decltype(auto)
inline

Returns an iterator pointing to the first data element.

Definition at line 109 of file ParallelData.h.

110  { return fData->begin(); }
parallel_data_t const * fData
Reference to the original data product.
Definition: ParallelData.h:138
template<typename AuxColl, typename Aux, typename Tag>
parallel_data_t const* proxy::details::ParallelData< AuxColl, Aux, Tag >::data ( ) const
inline

Returns a pointer to the whole data collection.

Definition at line 131 of file ParallelData.h.

131 { return fData; }
parallel_data_t const * fData
Reference to the original data product.
Definition: ParallelData.h:138
template<typename AuxColl, typename Aux, typename Tag>
parallel_data_t const& proxy::details::ParallelData< AuxColl, Aux, Tag >::dataRef ( ) const
inline

Returns a reference to the whole data collection.

Definition at line 134 of file ParallelData.h.

134 { return *(data()); }
parallel_data_t const * data() const
Returns a pointer to the whole data collection.
Definition: ParallelData.h:131
template<typename AuxColl, typename Aux, typename Tag>
auto proxy::details::ParallelData< AuxColl, Aux, Tag >::end ( ) const -> decltype(auto)
inline

Returns an iterator pointing past the last data element.

Definition at line 113 of file ParallelData.h.

114  { return fData->end(); }
parallel_data_t const * fData
Reference to the original data product.
Definition: ParallelData.h:138
template<typename AuxColl, typename Aux, typename Tag>
auto proxy::details::ParallelData< AuxColl, Aux, Tag >::getElement ( std::size_t  index) const -> decltype(auto)
inlineprivate

Definition at line 140 of file ParallelData.h.

141  { return util::makeTagged<tag>(fData->operator[](index)); }
parallel_data_t const * fData
Reference to the original data product.
Definition: ParallelData.h:138
template<typename AuxColl, typename Aux, typename Tag>
template<typename TestTag >
static constexpr bool proxy::details::ParallelData< AuxColl, Aux, Tag >::hasTag ( )
inlinestatic

Returns whether this data is labeled with the specified tag.

Definition at line 128 of file ParallelData.h.

128 { return std::is_same<TestTag, tag>(); }
template<typename AuxColl, typename Aux, typename Tag>
auto proxy::details::ParallelData< AuxColl, Aux, Tag >::operator[] ( std::size_t  index) const -> decltype(auto)
inline

Returns the element with the specified index (no check performed).

Definition at line 117 of file ParallelData.h.

118  {
119  static_assert(
120  std::is_convertible<decltype(getElement(index)), auxiliary_data_t>(),
121  "Inconsistent data types."
122  );
123  return getElement(index);
124  }
decltype(util::makeTagged< tag >(std::declval< aux_element_t >())) auxiliary_data_t
Type returned when accessing auxiliary data.
Definition: ParallelData.h:101
auto getElement(std::size_t index) const -> decltype(auto)
Definition: ParallelData.h:140

Member Data Documentation

template<typename AuxColl, typename Aux, typename Tag>
parallel_data_t const* proxy::details::ParallelData< AuxColl, Aux, Tag >::fData
private

Reference to the original data product.

Definition at line 138 of file ParallelData.h.


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