gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-252-gf9a3f78
a Global And Modular Bsm Inference Tool
Gambit::BEfunction_bucket< TYPE(*)(ARGS...), TYPE, ARGS... > Class Template Reference

Partial specialisation for non-variadic backend functions. More...

#include <safety_bucket.hpp>

Inheritance diagram for Gambit::BEfunction_bucket< TYPE(*)(ARGS...), TYPE, ARGS... >:
Collaboration diagram for Gambit::BEfunction_bucket< TYPE(*)(ARGS...), TYPE, ARGS... >:

Public Member Functions

 BEfunction_bucket (str mym, str myf, str me, backend_functor< TYPE(*)(ARGS...), TYPE, ARGS... > *functor_ptr_in=NULL)
 Constructor for non-variadic BEfunction_bucket. More...
 
TYPE operator() (ARGS &&...args)
 Call backend function. More...
 
- Public Member Functions inherited from Gambit::BEfunction_bucket_common< TYPE(*)(ARGS...), TYPE, ARGS... >
 BEfunction_bucket_common (str mym, str myf, str me, backend_functor< TYPE(*)(ARGS...), TYPE, ARGS... > *functor_ptr_in=NULL)
 Constructor for BEfunction_bucket_common. More...
 
void initialize (backend_functor< TYPE(*)(ARGS...), TYPE, ARGS... > *functor_ptr_in)
 Initialize this bucket with a functor pointer. More...
 
TYPE(*)(ARGS...) pointer ()
 Return the underlying function pointer. More...
 
- Public Member Functions inherited from Gambit::BE_bucket_base
 BE_bucket_base (str mym, str myf, str me)
 Constructor for BE_bucket_base. More...
 
str backend ()
 Get backend name. More...
 
str version ()
 Get version information. More...
 
- Public Member Functions inherited from Gambit::safety_bucket_base
 safety_bucket_base (str myinfo)
 Master constructor. More...
 
str name ()
 Get capability name. More...
 
str origin ()
 Get name of origin (module/backend). More...
 

Additional Inherited Members

- Protected Member Functions inherited from Gambit::safety_bucket_base
void dieGracefully () const
 Failure message invoked when the user tries to access the object before it is initialized. More...
 
- Protected Attributes inherited from Gambit::BEfunction_bucket_common< TYPE(*)(ARGS...), TYPE, ARGS... >
backend_functor< TYPE(*)(ARGS...), TYPE, ARGS... > * _functor_ptr
 
- Protected Attributes inherited from Gambit::safety_bucket_base
functor_functor_base_ptr
 
bool _initialized
 
const str whoami
 

Detailed Description

template<typename TYPE, typename... ARGS>
class Gambit::BEfunction_bucket< TYPE(*)(ARGS...), TYPE, ARGS... >

Partial specialisation for non-variadic backend functions.

Definition at line 316 of file safety_bucket.hpp.

Constructor & Destructor Documentation

◆ BEfunction_bucket()

template<typename TYPE , typename... ARGS>
Gambit::BEfunction_bucket< TYPE(*)(ARGS...), TYPE, ARGS... >::BEfunction_bucket ( str  mym,
str  myf,
str  me,
backend_functor< TYPE(*)(ARGS...), TYPE, ARGS... > *  functor_ptr_in = NULL 
)
inline

Constructor for non-variadic BEfunction_bucket.

Definition at line 322 of file safety_bucket.hpp.

323  : BEfunction_bucket_common<TYPE(*)(ARGS...),TYPE,ARGS...>(mym, myf, me, functor_ptr_in) {}
BEfunction_bucket_common(str mym, str myf, str me, backend_functor< TYPE(*)(ARGS...), TYPE, ARGS... > *functor_ptr_in=NULL)
Constructor for BEfunction_bucket_common.

Member Function Documentation

◆ operator()()

template<typename TYPE , typename... ARGS>
TYPE Gambit::BEfunction_bucket< TYPE(*)(ARGS...), TYPE, ARGS... >::operator() ( ARGS &&...  args)
inline

Call backend function.

Definition at line 326 of file safety_bucket.hpp.

References Gambit::safety_bucket_base::_initialized, convolve_with_theory::ARGS, and Gambit::safety_bucket_base::dieGracefully().

327  {
328  if (not this->_initialized) this->dieGracefully();
329  return (*(this->_functor_ptr))(std::forward<ARGS>(args)...);
330  }
void dieGracefully() const
Failure message invoked when the user tries to access the object before it is initialized.
backend_functor< TYPE(*)(ARGS...), TYPE, ARGS... > * _functor_ptr
Here is the call graph for this function:

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