knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::py::guarded_function< Signature, Guard > Class Template Reference

#include <with.h>

Public Types

typedef boost::function_types::result_type< Signature >::type result_type
 
typedef boost::function_types::result_type< Signature >::type result_type
 

Public Member Functions

template<typename Fn >
 guarded_function (Fn fn)
 
result_type operator() ()
 
template<typename A1 >
result_type operator() (const A1 &a1)
 
template<typename A1 , typename A2 >
result_type operator() (const A1 &a1, const A2 &a2)
 
template<typename A1 , typename A2 , typename A3 >
result_type operator() (const A1 &a1, const A2 &a2, const A3 &a3)
 
template<typename Fn >
 guarded_function (Fn fn)
 
result_type operator() ()
 
template<typename A1 >
result_type operator() (const A1 &a1)
 
template<typename A1 , typename A2 >
result_type operator() (const A1 &a1, const A2 &a2)
 
template<typename A1 , typename A2 , typename A3 >
result_type operator() (const A1 &a1, const A2 &a2, const A3 &a3)
 

Detailed Description

template<typename Signature, typename Guard>
class knowrob::py::guarded_function< Signature, Guard >

Functor that will invoke a function while holding a guard. Upon returning from the function, the guard is released.

Definition at line 21 of file with.h.

Member Typedef Documentation

◆ result_type [1/2]

template<typename Signature , typename Guard >
typedef boost::function_types::result_type<Signature>::type knowrob::py::guarded_function< Signature, Guard >::result_type

Definition at line 23 of file with.h.

◆ result_type [2/2]

template<typename Signature , typename Guard >
typedef boost::function_types::result_type<Signature>::type knowrob::py::guarded_function< Signature, Guard >::result_type

Definition at line 23 of file with.h.

Constructor & Destructor Documentation

◆ guarded_function() [1/2]

template<typename Signature , typename Guard >
template<typename Fn >
knowrob::py::guarded_function< Signature, Guard >::guarded_function ( Fn  fn)
inlineexplicit

Definition at line 26 of file with.h.

27  : fn_(fn) {}

◆ guarded_function() [2/2]

template<typename Signature , typename Guard >
template<typename Fn >
knowrob::py::guarded_function< Signature, Guard >::guarded_function ( Fn  fn)
inlineexplicit

Definition at line 26 of file with.h.

27  : fn_(fn) {}

Member Function Documentation

◆ operator()() [1/8]

template<typename Signature , typename Guard >
result_type knowrob::py::guarded_function< Signature, Guard >::operator() ( )
inline

Definition at line 29 of file with.h.

29  {
30  Guard g;
31  return fn_();
32  }

◆ operator()() [2/8]

template<typename Signature , typename Guard >
result_type knowrob::py::guarded_function< Signature, Guard >::operator() ( )
inline

Definition at line 29 of file with.h.

29  {
30  Guard g;
31  return fn_();
32  }

◆ operator()() [3/8]

template<typename Signature , typename Guard >
template<typename A1 >
result_type knowrob::py::guarded_function< Signature, Guard >::operator() ( const A1 &  a1)
inline

Definition at line 35 of file with.h.

35  {
36  Guard g;
37  return fn_(a1);
38  }

◆ operator()() [4/8]

template<typename Signature , typename Guard >
template<typename A1 >
result_type knowrob::py::guarded_function< Signature, Guard >::operator() ( const A1 &  a1)
inline

Definition at line 35 of file with.h.

35  {
36  Guard g;
37  return fn_(a1);
38  }

◆ operator()() [5/8]

template<typename Signature , typename Guard >
template<typename A1 , typename A2 >
result_type knowrob::py::guarded_function< Signature, Guard >::operator() ( const A1 &  a1,
const A2 &  a2 
)
inline

Definition at line 41 of file with.h.

41  {
42  Guard g;
43  return fn_(a1, a2);
44  }

◆ operator()() [6/8]

template<typename Signature , typename Guard >
template<typename A1 , typename A2 >
result_type knowrob::py::guarded_function< Signature, Guard >::operator() ( const A1 &  a1,
const A2 &  a2 
)
inline

Definition at line 41 of file with.h.

41  {
42  Guard g;
43  return fn_(a1, a2);
44  }

◆ operator()() [7/8]

template<typename Signature , typename Guard >
template<typename A1 , typename A2 , typename A3 >
result_type knowrob::py::guarded_function< Signature, Guard >::operator() ( const A1 &  a1,
const A2 &  a2,
const A3 &  a3 
)
inline

Definition at line 47 of file with.h.

47  {
48  Guard g;
49  return fn_(a1, a2, a3);
50  }

◆ operator()() [8/8]

template<typename Signature , typename Guard >
template<typename A1 , typename A2 , typename A3 >
result_type knowrob::py::guarded_function< Signature, Guard >::operator() ( const A1 &  a1,
const A2 &  a2,
const A3 &  a3 
)
inline

Definition at line 47 of file with.h.

47  {
48  Guard g;
49  return fn_(a1, a2, a3);
50  }

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