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

An interface class for backend functions. More...

#include <safety_bucket.hpp>

Inheritance diagram for Gambit::BEfunction_bucket_common< PTR_TYPE, TYPE, ARGS >:
Collaboration diagram for Gambit::BEfunction_bucket_common< PTR_TYPE, TYPE, ARGS >:

Public Member Functions

 BEfunction_bucket_common (str mym, str myf, str me, backend_functor< PTR_TYPE, TYPE, ARGS... > *functor_ptr_in=NULL)
 Constructor for BEfunction_bucket_common. More...
 
void initialize (backend_functor< PTR_TYPE, TYPE, ARGS... > *functor_ptr_in)
 Initialize this bucket with a functor pointer. More...
 
PTR_TYPE 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...
 

Protected Attributes

backend_functor< PTR_TYPE, TYPE, ARGS... > * _functor_ptr
 
- Protected Attributes inherited from Gambit::safety_bucket_base
functor_functor_base_ptr
 
bool _initialized
 
const str whoami
 

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...
 

Detailed Description

template<typename PTR_TYPE, typename TYPE, typename... ARGS>
class Gambit::BEfunction_bucket_common< PTR_TYPE, TYPE, ARGS >

An interface class for backend functions.

Definition at line 269 of file safety_bucket.hpp.

Constructor & Destructor Documentation

◆ BEfunction_bucket_common()

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

Constructor for BEfunction_bucket_common.

Definition at line 274 of file safety_bucket.hpp.

275  : BE_bucket_base(mym, myf, me)
276  {
277  initialize(functor_ptr_in);
278  }
BE_bucket_base(str mym, str myf, str me)
Constructor for BE_bucket_base.
void initialize(backend_functor< PTR_TYPE, TYPE, ARGS... > *functor_ptr_in)
Initialize this bucket with a functor pointer.

Member Function Documentation

◆ initialize()

template<typename PTR_TYPE, typename TYPE, typename... ARGS>
void Gambit::BEfunction_bucket_common< PTR_TYPE, TYPE, ARGS >::initialize ( backend_functor< PTR_TYPE, TYPE, ARGS... > *  functor_ptr_in)
inline

Initialize this bucket with a functor pointer.

Definition at line 281 of file safety_bucket.hpp.

282  {
283  _functor_ptr = functor_ptr_in;
284  _functor_base_ptr = functor_ptr_in;
285 
286  if (functor_ptr_in == NULL)
287  {
288  _initialized = false;
289  }
290  else
291  {
292  _initialized = true;
293  }
294  }
backend_functor< PTR_TYPE, TYPE, ARGS... > * _functor_ptr

◆ pointer()

template<typename PTR_TYPE, typename TYPE, typename... ARGS>
PTR_TYPE Gambit::BEfunction_bucket_common< PTR_TYPE, TYPE, ARGS >::pointer ( )
inline

Return the underlying function pointer.

Definition at line 297 of file safety_bucket.hpp.

298  {
299  if (not _initialized) dieGracefully();
300  return _functor_ptr->handoutFunctionPointer();
301  }
void dieGracefully() const
Failure message invoked when the user tries to access the object before it is initialized.
backend_functor< PTR_TYPE, TYPE, ARGS... > * _functor_ptr

Member Data Documentation

◆ _functor_ptr

template<typename PTR_TYPE, typename TYPE, typename... ARGS>
backend_functor<PTR_TYPE, TYPE, ARGS...>* Gambit::BEfunction_bucket_common< PTR_TYPE, TYPE, ARGS >::_functor_ptr
protected

Definition at line 306 of file safety_bucket.hpp.


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