All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Types | List of all members
proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag > Class Template Reference

Helper to create associated data proxy. More...

#include <WithAssociatedStructBase.h>

Public Types

template<typename CollProxy >
using aux_collection_proxy_t = typename proxy_maker_t< CollProxy >::aux_collection_proxy_t
 Type of association proxy created for the specified CollProxy. More...
 

Public Member Functions

 WithAssociatedStructBase (ArgTuple &&args)
 
template<typename CollProxy , typename Event , typename Handle , typename MainArgs >
auto createAuxProxyMaker (Event const &event, Handle &&mainHandle, MainArgs const &mainArgs)
 Creates the associated data proxy by means of ProxyMaker. More...
 

Protected Member Functions

template<typename CollProxy , typename Event , typename Handle , typename MainArgs , std::size_t... I>
auto createAssnProxyMaker (Event const &event, Handle &&mainHandle, MainArgs const &mainArgs, std::index_sequence< I...>)
 

Protected Attributes

ArgTuple args
 Argument construction storage as tuple. More...
 

Static Protected Attributes

static constexpr std::size_t NArgs = std::tuple_size<ArgTuple>()
 Number of arguments stored. More...
 

Private Types

template<typename CollProxy >
using main_t = typename CollProxy::main_element_t
 Type of main data product element from a proxy of type CollProxy. More...
 
using aux_t = Aux
 Type of associated data. More...
 
using metadata_t = Metadata
 Type of associated metadata. More...
 
using tag = AuxTag
 Tag for the associated data (same as the data type itself). More...
 
template<typename CollProxy >
using proxy_maker_t = ProxyMaker< CollProxy >
 Class to create the data proxy associated to a CollProxy. More...
 

Detailed Description

template<typename Aux, typename Metadata, typename ArgTuple, template< typename CollProxy > class ProxyMaker, typename AuxTag>
class proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >

Helper to create associated data proxy.

Template Parameters
Auxtype of data associated to the main one
Metadatatype of metadata of the association
ArgTupletype of arguments required for the creation of proxy
ProxyMakertemplate type of the proxy maker class
AuxTagtag for the associated data (default: as Aux)

This class stores user arguments for the construction of a proxy to associated data of type Aux. It can use that information plus some additional one to create the associated data itself. This additional information is provided by getCollection().

The association will be identified by type AuxTag.

This is not a customization point: to have a custom associated data produced, choose and then specialize the ProxyMaker class.

Definition at line 71 of file WithAssociatedStructBase.h.

Member Typedef Documentation

template<typename Aux , typename Metadata , typename ArgTuple , template< typename CollProxy > class ProxyMaker, typename AuxTag >
template<typename CollProxy >
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::aux_collection_proxy_t = typename proxy_maker_t<CollProxy>::aux_collection_proxy_t

Type of association proxy created for the specified CollProxy.

Definition at line 95 of file WithAssociatedStructBase.h.

template<typename Aux , typename Metadata , typename ArgTuple , template< typename CollProxy > class ProxyMaker, typename AuxTag >
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::aux_t = Aux
private

Type of associated data.

Definition at line 78 of file WithAssociatedStructBase.h.

template<typename Aux , typename Metadata , typename ArgTuple , template< typename CollProxy > class ProxyMaker, typename AuxTag >
template<typename CollProxy >
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::main_t = typename CollProxy::main_element_t
private

Type of main data product element from a proxy of type CollProxy.

Definition at line 75 of file WithAssociatedStructBase.h.

template<typename Aux , typename Metadata , typename ArgTuple , template< typename CollProxy > class ProxyMaker, typename AuxTag >
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::metadata_t = Metadata
private

Type of associated metadata.

Definition at line 81 of file WithAssociatedStructBase.h.

template<typename Aux , typename Metadata , typename ArgTuple , template< typename CollProxy > class ProxyMaker, typename AuxTag >
template<typename CollProxy >
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::proxy_maker_t = ProxyMaker<CollProxy>
private

Class to create the data proxy associated to a CollProxy.

Definition at line 88 of file WithAssociatedStructBase.h.

template<typename Aux , typename Metadata , typename ArgTuple , template< typename CollProxy > class ProxyMaker, typename AuxTag >
using proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::tag = AuxTag
private

Tag for the associated data (same as the data type itself).

Definition at line 84 of file WithAssociatedStructBase.h.

Constructor & Destructor Documentation

template<typename Aux , typename Metadata , typename ArgTuple , template< typename CollProxy > class ProxyMaker, typename AuxTag >
proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::WithAssociatedStructBase ( ArgTuple &&  args)
inline

Constructor: steals the arguments, to be used by createAuxProxyMaker().

Definition at line 99 of file WithAssociatedStructBase.h.

99 : args(std::move(args)) {}
ArgTuple args
Argument construction storage as tuple.

Member Function Documentation

template<typename Aux , typename Metadata , typename ArgTuple , template< typename CollProxy > class ProxyMaker, typename AuxTag >
template<typename CollProxy , typename Event , typename Handle , typename MainArgs , std::size_t... I>
auto proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::createAssnProxyMaker ( Event const &  event,
Handle &&  mainHandle,
MainArgs const &  mainArgs,
std::index_sequence< I...>   
)
inlineprotected

Definition at line 126 of file WithAssociatedStructBase.h.

130  {
131  return proxy_maker_t<CollProxy>::make(
132  event, mainHandle, mainArgs,
133  std::get<I>(std::forward<ArgTuple>(args))...
134  );
135  }
ArgTuple args
Argument construction storage as tuple.
template<typename Aux , typename Metadata , typename ArgTuple , template< typename CollProxy > class ProxyMaker, typename AuxTag >
template<typename CollProxy , typename Event , typename Handle , typename MainArgs >
auto proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::createAuxProxyMaker ( Event const &  event,
Handle &&  mainHandle,
MainArgs const &  mainArgs 
)
inline

Creates the associated data proxy by means of ProxyMaker.

Definition at line 105 of file WithAssociatedStructBase.h.

106  {
107  return createAssnProxyMaker<CollProxy>(
108  event, std::forward<Handle>(mainHandle), mainArgs,
109  std::make_index_sequence<NArgs>()
110  );
111  } // construct()

Member Data Documentation

template<typename Aux , typename Metadata , typename ArgTuple , template< typename CollProxy > class ProxyMaker, typename AuxTag >
ArgTuple proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::args
protected

Argument construction storage as tuple.

Definition at line 116 of file WithAssociatedStructBase.h.

template<typename Aux , typename Metadata , typename ArgTuple , template< typename CollProxy > class ProxyMaker, typename AuxTag >
constexpr std::size_t proxy::details::WithAssociatedStructBase< Aux, Metadata, ArgTuple, ProxyMaker, AuxTag >::NArgs = std::tuple_size<ArgTuple>()
staticprotected

Number of arguments stored.

Definition at line 119 of file WithAssociatedStructBase.h.


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