gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
Gambit::Scanner::scan_ptr< ret(args...)> Class Template Reference

Container class that hold the output of the "get_purpose" function. More...

#include <factory_defs.hpp>

Inheritance diagram for Gambit::Scanner::scan_ptr< ret(args...)>:
Collaboration diagram for Gambit::Scanner::scan_ptr< ret(args...)>:

Public Member Functions

 scan_ptr ()
 
 scan_ptr (const scan_ptr &in)
 
 scan_ptr (scan_ptr &&in)
 
 scan_ptr (void *in)
 
scan_ptr< ret(args...)> & operator= (void *in)
 
scan_ptr< ret(args...)> & operator= (const scan_ptr< ret(args...)> &in)
 
scan_ptr< ret(args...)> & operator= (s_ptr &&in)
 
ret operator() (const args &... params)
 

Private Types

typedef shared_ptr< Function_Base< ret(args...) > > s_ptr
 

Detailed Description

template<typename ret, typename... args>
class Gambit::Scanner::scan_ptr< ret(args...)>

Container class that hold the output of the "get_purpose" function.

Definition at line 241 of file factory_defs.hpp.

Member Typedef Documentation

◆ s_ptr

template<typename ret , typename... args>
typedef shared_ptr< Function_Base< ret (args...) > > Gambit::Scanner::scan_ptr< ret(args...)>::s_ptr
private

Definition at line 244 of file factory_defs.hpp.

Constructor & Destructor Documentation

◆ scan_ptr() [1/4]

template<typename ret , typename... args>
Gambit::Scanner::scan_ptr< ret(args...)>::scan_ptr ( )
inline

Definition at line 247 of file factory_defs.hpp.

247 {}

◆ scan_ptr() [2/4]

template<typename ret , typename... args>
Gambit::Scanner::scan_ptr< ret(args...)>::scan_ptr ( const scan_ptr< ret(args...)> &  in)
inline

Definition at line 248 of file factory_defs.hpp.

248 : s_ptr (in){}
shared_ptr< Function_Base< ret(args...) > > s_ptr

◆ scan_ptr() [3/4]

template<typename ret , typename... args>
Gambit::Scanner::scan_ptr< ret(args...)>::scan_ptr ( scan_ptr< ret(args...)> &&  in)
inline

Definition at line 249 of file factory_defs.hpp.

249 : s_ptr (std::move(in)) {}
shared_ptr< Function_Base< ret(args...) > > s_ptr

◆ scan_ptr() [4/4]

template<typename ret , typename... args>
Gambit::Scanner::scan_ptr< ret(args...)>::scan_ptr ( void in)
inline

Definition at line 250 of file factory_defs.hpp.

References find_all_gambit_bits::args, scan_end, and scan_err.

250  : s_ptr
251  (
252  static_cast< Function_Base<ret (args...)>* >(in),
253  Function_Deleter<ret (args...)>(in)
254  )
255  {
256  if (typeid(ret (args...)) != this->get()->type())
257  {
258  scan_err << "scan_ptr and the functor return by \"get functor\" do not have the same type." << scan_end;
259  }
260  }
#define scan_err
Defined to macros to output errors in the form: scan_err << "error" << scan_end; scan_warn << "warnin...
#define scan_end
shared_ptr< Function_Base< ret(args...) > > s_ptr

Member Function Documentation

◆ operator()()

template<typename ret , typename... args>
ret Gambit::Scanner::scan_ptr< ret(args...)>::operator() ( const args &...  params)
inline

Definition at line 295 of file factory_defs.hpp.

296  {
297  return (*this)->operator()(params...);
298  }

◆ operator=() [1/3]

template<typename ret , typename... args>
scan_ptr<ret (args...)>& Gambit::Scanner::scan_ptr< ret(args...)>::operator= ( void in)
inline

Definition at line 262 of file factory_defs.hpp.

References find_all_gambit_bits::args, scan_end, and scan_err.

263  {
264  this->s_ptr::operator=
265  (
266  s_ptr
267  (
268  static_cast< Function_Base<ret (args...)>* >(in),
269  Function_Deleter<ret (args...)>(in)
270  )
271  );
272 
273  if (typeid(ret (args...)) != this->get()->type())
274  {
275  scan_err << "scan_ptr and the functor return by \"get functor\" do not have the same type." << scan_end;
276  }
277 
278  return *this;
279  }
#define scan_err
Defined to macros to output errors in the form: scan_err << "error" << scan_end; scan_warn << "warnin...
#define scan_end
shared_ptr< Function_Base< ret(args...) > > s_ptr

◆ operator=() [2/3]

template<typename ret , typename... args>
scan_ptr<ret (args...)>& Gambit::Scanner::scan_ptr< ret(args...)>::operator= ( const scan_ptr< ret(args...)> &  in)
inline

Definition at line 281 of file factory_defs.hpp.

282  {
283  this->s_ptr::operator=(in);
284 
285  return *this;
286  }

◆ operator=() [3/3]

template<typename ret , typename... args>
scan_ptr<ret (args...)>& Gambit::Scanner::scan_ptr< ret(args...)>::operator= ( s_ptr &&  in)
inline

Definition at line 288 of file factory_defs.hpp.

289  {
290  this->s_ptr::operator=(std::move(in));
291 
292  return *this;
293  }

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