45 #define G4AnyMethod_h 1
54 virtual const char*
what()
const throw() {
55 return "G4BadArgument: failed operator()";
59 #if defined(G4USE_STD11) || defined(G4USE_STD14)
60 #include <type_traits>
61 using std::remove_reference;
62 using std::remove_const;
75 template<
typename T>
struct remove_const<
const T> {
typedef T
type;};
92 template <
class S,
class T,
class A0,
class A1>
G4AnyMethod(
S (T::*f)(A0,A1)) :
narg(2) {
143 const std::type_info&
ArgType(
size_t n = 0)
const {
154 virtual void operator()(
void*,
const std::string&) = 0;
155 virtual const std::type_info&
ArgType(
size_t)
const = 0;
170 virtual const std::type_info&
ArgType(
size_t)
const {
177 typedef typename remove_const<typename remove_reference<A0>::type>::type
nakedA0;
186 std::stringstream strs(s0);
193 virtual const std::type_info&
ArgType(
size_t)
const {
200 typedef typename remove_const<typename remove_reference<A0>::type>::type
nakedA0;
201 typedef typename remove_const<typename remove_reference<A1>::type>::type
nakedA1;
211 std::stringstream strs(s0);
218 virtual const std::type_info&
ArgType(
size_t i)
const {
219 return i == 0 ?
typeid(A0) :
typeid(A1);
virtual const char * what() const
remove_const< typename remove_reference< A1 >::type >::type nakedA1
virtual void operator()(void *)=0
virtual void operator()(void *obj, const std::string &s0)
virtual Placeholder * Clone() const
G4AnyMethod & operator=(S(T::*f)())
const std::type_info & ArgType(size_t n=0) const
virtual void operator()(void *obj)
virtual const std::type_info & ArgType(size_t i) const
remove_const< typename remove_reference< A0 >::type >::type nakedA0
virtual Placeholder * Clone() const
virtual Placeholder * Clone() const
FuncRef2(S(T::*f)(A0, A1))
const G4ThreeVector const G4double const
virtual void operator()(void *)
G4AnyMethod(const G4AnyMethod &other)
virtual const std::type_info & ArgType(size_t) const
G4AnyMethod(S(T::*f)(A0, A1))
virtual void operator()(void *)
G4AnyMethod & Swap(G4AnyMethod &rhs)
virtual void operator()(void *obj, const std::string &s0)
virtual void operator()(void *, const std::string &)
typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData
void operator()(void *obj)
void operator()(void *obj, const std::string &a0)
virtual Placeholder * Clone() const =0
remove_const< typename remove_reference< A0 >::type >::type nakedA0
virtual const std::type_info & ArgType(size_t) const =0
virtual const std::type_info & ArgType(size_t) const
G4AnyMethod(S(T::*f)(A0))