Belle II Software development
InputHandlerFactory< T > Struct Template Reference

Helper class to easily register new input handlers. More...

#include <Gearbox.h>

Public Member Functions

 InputHandlerFactory (const std::string &prefix)
 constructor, used by B2_GEARBOX_REGISTER_INPUTHANDLER macro.
 

Static Public Member Functions

static gearbox::InputHandlerfactory (const std::string &uri)
 create a new InputHandler of type T for given URI.
 

Detailed Description

template<class T>
struct Belle2::InputHandlerFactory< T >

Helper class to easily register new input handlers.

Definition at line 236 of file Gearbox.h.

Constructor & Destructor Documentation

◆ InputHandlerFactory()

template<class T>
InputHandlerFactory ( const std::string & prefix)
inlineexplicit

constructor, used by B2_GEARBOX_REGISTER_INPUTHANDLER macro.

Definition at line 238 of file Gearbox.h.

239 {
240 Gearbox::registerInputHandler(prefix, factory);
241 }

Member Function Documentation

◆ factory()

template<class T>
static gearbox::InputHandler * factory ( const std::string & uri)
inlinestatic

create a new InputHandler of type T for given URI.

Definition at line 243 of file Gearbox.h.

244 {
245 return new T(uri);
246 }

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