The Gaudi Framework  master (594c33fa)
Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits > Class Template Reference

#include </builds/gaudi/Gaudi/GaudiFunctional/include/Gaudi/Functional/ToolBinder.h>

Inheritance diagram for Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >:
Collaboration diagram for Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >:

Public Types

using KeyValue = std::pair< std::string, std::string >
 
- Public Types inherited from extends< details::BaseClass_t< Traits, AlgTool >, Gaudi::Interface::Bind::IBinder< IFace > >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces... >
 Typedef to the base of this class. More...
 
- Public Types inherited from extend_interfaces< Interfaces... >
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
 take union of the ext_iids of all Interfaces... More...
 

Public Member Functions

 ToolBinder (std::string type, std::string name, const IInterface *parent, Gaudi::Functional::details::RepeatValues_< KeyValue, N > const &inputs, Gaudi::Interface::Bind::Box< IFace >(*creator)(void const *, Args const &...))
 
Gaudi::Interface::Bind::Box< IFace > bind (EventContext const &ctx) const final
 
- Public Member Functions inherited from extends< details::BaseClass_t< Traits, AlgTool >, Gaudi::Interface::Bind::IBinder< IFace > >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 

Static Public Member Functions

template<typename BoundInstance , typename Self >
static auto construct (Self *)
 

Private Member Functions

template<typename IArgs , std::size_t... I>
 ToolBinder (std::string type, std::string name, const IInterface *parent, IArgs &&args, Gaudi::Interface::Bind::Box< IFace >(*creator)(void const *, Args const &...), std::index_sequence< I... >)
 

Private Attributes

std::tuple< details::InputHandle_t< Traits, Args >... > m_handles
 
Gaudi::Interface::Bind::Box< IFace >(* m_creator )(void const *, Args const &...)
 

Static Private Attributes

constexpr static std::size_t N = sizeof...( Args )
 

Detailed Description

template<typename IFace, typename... Args, typename Traits>
class Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >

Definition at line 25 of file ToolBinder.h.

Member Typedef Documentation

◆ KeyValue

template<typename IFace , typename... Args, typename Traits >
using Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >::KeyValue = std::pair<std::string, std::string>

Definition at line 43 of file ToolBinder.h.

Constructor & Destructor Documentation

◆ ToolBinder() [1/2]

template<typename IFace , typename... Args, typename Traits >
template<typename IArgs , std::size_t... I>
Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >::ToolBinder ( std::string  type,
std::string  name,
const IInterface parent,
IArgs &&  args,
Gaudi::Interface::Bind::Box< IFace >(*)(void const *, Args const &...)  creator,
std::index_sequence< I... >   
)
inlineprivate

Definition at line 31 of file ToolBinder.h.

◆ ToolBinder() [2/2]

template<typename IFace , typename... Args, typename Traits >
Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >::ToolBinder ( std::string  type,
std::string  name,
const IInterface parent,
Gaudi::Functional::details::RepeatValues_< KeyValue, N > const &  inputs,
Gaudi::Interface::Bind::Box< IFace >(*)(void const *, Args const &...)  creator 
)
inline

Definition at line 44 of file ToolBinder.h.

47  : ToolBinder{ std::move( type ), std::move( name ), parent, inputs, creator, std::make_index_sequence<N>{} } {
48  }

Member Function Documentation

◆ bind()

template<typename IFace , typename... Args, typename Traits >
Gaudi::Interface::Bind::Box<IFace> Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >::bind ( EventContext const &  ctx) const
inlinefinal

Definition at line 50 of file ToolBinder.h.

50  {
51  return std::apply(
52  [&]( auto const&... arg ) {
53  using namespace details;
54  return std::invoke( m_creator, this, get( arg, *this, ctx )... );
55  },
56  m_handles );
57  }

◆ construct()

template<typename IFace , typename... Args, typename Traits >
template<typename BoundInstance , typename Self >
static auto Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >::construct ( Self *  )
inlinestatic

Definition at line 72 of file ToolBinder.h.

72  {
73  static_assert( std::is_base_of_v<ToolBinder, Self> );
74  return +[]( void const* ptr, const Args&... args ) {
75  return Gaudi::Interface::Bind::Box<IFace>{ std::in_place_type<BoundInstance>,
76  static_cast<std::add_const_t<Self>*>( ptr ), args... };
77  };
78  }

Member Data Documentation

◆ m_creator

template<typename IFace , typename... Args, typename Traits >
Gaudi::Interface::Bind::Box<IFace>( * Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >::m_creator) (void const *, Args const &...)
private

Definition at line 39 of file ToolBinder.h.

◆ m_handles

template<typename IFace , typename... Args, typename Traits >
std::tuple<details::InputHandle_t<Traits, Args>...> Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >::m_handles
private

Definition at line 39 of file ToolBinder.h.

◆ N

template<typename IFace , typename... Args, typename Traits >
constexpr static std::size_t Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >::N = sizeof...( Args )
staticconstexprprivate

Definition at line 28 of file ToolBinder.h.


The documentation for this class was generated from the following file:
std::move
T move(T... args)
Gaudi::Interface::Bind::Box
Definition: IBinder.h:23
Gaudi::Functional::details::get
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
Definition: details.h:440
GaudiPython.Pythonizations.ctx
ctx
Definition: Pythonizations.py:578
details
Definition: AnyDataWrapper.h:19
Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >::m_handles
std::tuple< details::InputHandle_t< Traits, Args >... > m_handles
Definition: ToolBinder.h:39
Write.creator
creator
Definition: Write.py:23
std::forward_as_tuple
T forward_as_tuple(T... args)
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:20
gaudirun.type
type
Definition: gaudirun.py:160
Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >::m_creator
Gaudi::Interface::Bind::Box< IFace >(* m_creator)(void const *, Args const &...)
Definition: ToolBinder.h:40
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
gaudirun.args
args
Definition: gaudirun.py:336
std::tuple_cat
T tuple_cat(T... args)
Gaudi::Interface::Bind::IBinder
Definition: IBinder.h:56
Gaudi::Functional::details::ToolBinder< Gaudi::Interface::Bind::Box< IFace >(Args const &...), Traits >::ToolBinder
ToolBinder(std::string type, std::string name, const IInterface *parent, IArgs &&args, Gaudi::Interface::Bind::Box< IFace >(*creator)(void const *, Args const &...), std::index_sequence< I... >)
Definition: ToolBinder.h:31