OGS 6.2.0-97-g4a610c866
BaseLib::detail Namespace Reference

Classes

struct  FunctionTraits
 
struct  FunctionTraits< ReturnType(Object::*)(Args...) const >
 
struct  FunctionTraits< ReturnType(Object::*)(Args...)>
 
struct  IndexedPlacedPlaceholder
 

Functions

template<typename Msg >
bool error_impl (Msg &&msg)
 
 DEFINE_INDEXEDPLACEHOLDER_MEMBER (0, 1)
 
 DEFINE_INDEXEDPLACEHOLDER_MEMBER (1, 2)
 
 DEFINE_INDEXEDPLACEHOLDER_MEMBER (2, 3)
 
 DEFINE_INDEXEDPLACEHOLDER_MEMBER (3, 4)
 
 DEFINE_INDEXEDPLACEHOLDER_MEMBER (4, 5)
 
 DEFINE_INDEXEDPLACEHOLDER_MEMBER (5, 6)
 
 DEFINE_INDEXEDPLACEHOLDER_MEMBER (6, 7)
 
 DEFINE_INDEXEDPLACEHOLDER_MEMBER (7, 8)
 
 DEFINE_INDEXEDPLACEHOLDER_MEMBER (8, 9)
 
 DEFINE_INDEXEDPLACEHOLDER_MEMBER (9, 10)
 
 SPECIALIZE_INDEXEDPLACEHOLDER (0, 1)
 
 SPECIALIZE_INDEXEDPLACEHOLDER (1, 2)
 
 SPECIALIZE_INDEXEDPLACEHOLDER (2, 3)
 
 SPECIALIZE_INDEXEDPLACEHOLDER (3, 4)
 
 SPECIALIZE_INDEXEDPLACEHOLDER (4, 5)
 
 SPECIALIZE_INDEXEDPLACEHOLDER (5, 6)
 
 SPECIALIZE_INDEXEDPLACEHOLDER (6, 7)
 
 SPECIALIZE_INDEXEDPLACEHOLDER (7, 8)
 
 SPECIALIZE_INDEXEDPLACEHOLDER (8, 9)
 
 SPECIALIZE_INDEXEDPLACEHOLDER (9, 10)
 
template<int... Indices, typename Object , typename ReturnType , typename... Args>
std::function< ReturnType(Args...)> easyBind_innermost (ReturnType(Object::*method)(Args...), Object &obj)
 
template<int... Indices, typename Object , typename ReturnType , typename... Args>
std::function< ReturnType(Args...)> easyBind_innermost (ReturnType(Object::*method)(Args...) const, Object const &obj)
 
template<int... Indices, typename Object , typename MethodClass , typename ReturnType , typename... Args>
std::function< ReturnType(Args...)> easyBind_innermost (ReturnType(MethodClass::*method)(Args...), Object &&obj)
 
template<int... Indices, typename Object , typename MethodClass , typename ReturnType , typename... Args>
std::function< ReturnType(Args...)> easyBind_inner (ReturnType(MethodClass::*method)(Args...), Object &&obj, std::integer_sequence< int, Indices... >)
 

Function Documentation

◆ DEFINE_INDEXEDPLACEHOLDER_MEMBER() [1/10]

BaseLib::detail::DEFINE_INDEXEDPLACEHOLDER_MEMBER ( ,
 
)

◆ DEFINE_INDEXEDPLACEHOLDER_MEMBER() [2/10]

BaseLib::detail::DEFINE_INDEXEDPLACEHOLDER_MEMBER ( ,
 
)

◆ DEFINE_INDEXEDPLACEHOLDER_MEMBER() [3/10]

BaseLib::detail::DEFINE_INDEXEDPLACEHOLDER_MEMBER ( ,
 
)

◆ DEFINE_INDEXEDPLACEHOLDER_MEMBER() [4/10]

BaseLib::detail::DEFINE_INDEXEDPLACEHOLDER_MEMBER ( ,
 
)

◆ DEFINE_INDEXEDPLACEHOLDER_MEMBER() [5/10]

BaseLib::detail::DEFINE_INDEXEDPLACEHOLDER_MEMBER ( ,
 
)

◆ DEFINE_INDEXEDPLACEHOLDER_MEMBER() [6/10]

BaseLib::detail::DEFINE_INDEXEDPLACEHOLDER_MEMBER ( ,
 
)

◆ DEFINE_INDEXEDPLACEHOLDER_MEMBER() [7/10]

BaseLib::detail::DEFINE_INDEXEDPLACEHOLDER_MEMBER ( ,
 
)

◆ DEFINE_INDEXEDPLACEHOLDER_MEMBER() [8/10]

BaseLib::detail::DEFINE_INDEXEDPLACEHOLDER_MEMBER ( ,
 
)

◆ DEFINE_INDEXEDPLACEHOLDER_MEMBER() [9/10]

BaseLib::detail::DEFINE_INDEXEDPLACEHOLDER_MEMBER ( ,
 
)

◆ DEFINE_INDEXEDPLACEHOLDER_MEMBER() [10/10]

BaseLib::detail::DEFINE_INDEXEDPLACEHOLDER_MEMBER ( ,
10   
)

◆ easyBind_inner()

template<int... Indices, typename Object , typename MethodClass , typename ReturnType , typename... Args>
std::function< ReturnType(Args...)> BaseLib::detail::easyBind_inner ( ReturnType(MethodClass::*)(Args...)  method,
Object &&  obj,
std::integer_sequence< int, Indices... >   
)

Definition at line 101 of file Functional.h.

References easyBind_innermost().

Referenced by BaseLib::easyBind().

104 {
105  return easyBind_innermost<Indices...>(method, std::forward<Object>(obj));
106 }
std::function< ReturnType(Args...)> easyBind_innermost(ReturnType(MethodClass::*method)(Args...), Object &&obj)
Definition: Functional.h:83

◆ easyBind_innermost() [1/3]

template<int... Indices, typename Object , typename ReturnType , typename... Args>
std::function< ReturnType(Args...)> BaseLib::detail::easyBind_innermost ( ReturnType(Object::*)(Args...)  method,
Object &  obj 
)

Definition at line 53 of file Functional.h.

Referenced by easyBind_inner(), and easyBind_innermost().

55 {
56  // std::ref makes sure that obj is not copied.
57  return std::bind(method, std::ref(obj),
58  IndexedPlacedPlaceholder<Indices>::value...);
59 }

◆ easyBind_innermost() [2/3]

template<int... Indices, typename Object , typename ReturnType , typename... Args>
std::function<ReturnType(Args...)> BaseLib::detail::easyBind_innermost ( ReturnType(Object::*)(Args...) const  method,
Object const &  obj 
)

Definition at line 63 of file Functional.h.

References easyBind_innermost().

65 {
66  // std::cref makes sure that obj is not copied.
67  return std::bind(method, std::cref(obj),
68  IndexedPlacedPlaceholder<Indices>::value...);
69 }

◆ easyBind_innermost() [3/3]

template<int... Indices, typename Object , typename MethodClass , typename ReturnType , typename... Args>
std::function< ReturnType(Args...)> BaseLib::detail::easyBind_innermost ( ReturnType(MethodClass::*)(Args...)  method,
Object &&  obj 
)

Definition at line 83 of file Functional.h.

References easyBind_innermost().

85 {
86  return std::bind(method, std::forward<Object>(obj),
87  IndexedPlacedPlaceholder<Indices>::value...);
88 }

◆ error_impl()

template<typename Msg >
bool BaseLib::detail::error_impl ( Msg &&  msg)

Definition at line 43 of file Error.h.

44 {
45  throw std::runtime_error(std::forward<Msg>(msg));
46 }

◆ SPECIALIZE_INDEXEDPLACEHOLDER() [1/10]

BaseLib::detail::SPECIALIZE_INDEXEDPLACEHOLDER ( ,
 
)

◆ SPECIALIZE_INDEXEDPLACEHOLDER() [2/10]

BaseLib::detail::SPECIALIZE_INDEXEDPLACEHOLDER ( ,
 
)

◆ SPECIALIZE_INDEXEDPLACEHOLDER() [3/10]

BaseLib::detail::SPECIALIZE_INDEXEDPLACEHOLDER ( ,
 
)

◆ SPECIALIZE_INDEXEDPLACEHOLDER() [4/10]

BaseLib::detail::SPECIALIZE_INDEXEDPLACEHOLDER ( ,
 
)

◆ SPECIALIZE_INDEXEDPLACEHOLDER() [5/10]

BaseLib::detail::SPECIALIZE_INDEXEDPLACEHOLDER ( ,
 
)

◆ SPECIALIZE_INDEXEDPLACEHOLDER() [6/10]

BaseLib::detail::SPECIALIZE_INDEXEDPLACEHOLDER ( ,
 
)

◆ SPECIALIZE_INDEXEDPLACEHOLDER() [7/10]

BaseLib::detail::SPECIALIZE_INDEXEDPLACEHOLDER ( ,
 
)

◆ SPECIALIZE_INDEXEDPLACEHOLDER() [8/10]

BaseLib::detail::SPECIALIZE_INDEXEDPLACEHOLDER ( ,
 
)

◆ SPECIALIZE_INDEXEDPLACEHOLDER() [9/10]

BaseLib::detail::SPECIALIZE_INDEXEDPLACEHOLDER ( ,
 
)

◆ SPECIALIZE_INDEXEDPLACEHOLDER() [10/10]

BaseLib::detail::SPECIALIZE_INDEXEDPLACEHOLDER ( ,
10   
)