Geant4-11
Public Types | Public Member Functions | Data Fields
G4AnyMethod::FuncRef2< S, T, A0, A1 > Struct Template Reference
Inheritance diagram for G4AnyMethod::FuncRef2< S, T, A0, A1 >:
G4AnyMethod::Placeholder

Public Types

typedef remove_const< typenameremove_reference< A0 >::type >::type nakedA0
 
typedef remove_const< typenameremove_reference< A1 >::type >::type nakedA1
 

Public Member Functions

virtual const std::type_info & ArgType (size_t i) const
 
virtual PlaceholderClone () const
 
 FuncRef2 (S(T::*f)(A0, A1))
 
virtual void operator() (void *)
 
virtual void operator() (void *obj, const std::string &s0)
 

Data Fields

S(T::* fRef )(A0, A1)
 

Detailed Description

template<class S, class T, class A0, class A1>
struct G4AnyMethod::FuncRef2< S, T, A0, A1 >

Definition at line 223 of file G4AnyMethod.hh.

Member Typedef Documentation

◆ nakedA0

template<class S , class T , class A0 , class A1 >
typedef remove_const<typenameremove_reference<A0>::type>::type G4AnyMethod::FuncRef2< S, T, A0, A1 >::nakedA0

Definition at line 226 of file G4AnyMethod.hh.

◆ nakedA1

template<class S , class T , class A0 , class A1 >
typedef remove_const<typenameremove_reference<A1>::type>::type G4AnyMethod::FuncRef2< S, T, A0, A1 >::nakedA1

Definition at line 228 of file G4AnyMethod.hh.

Constructor & Destructor Documentation

◆ FuncRef2()

template<class S , class T , class A0 , class A1 >
G4AnyMethod::FuncRef2< S, T, A0, A1 >::FuncRef2 ( S(T::*)(A0, A1)  f)
inline

Definition at line 230 of file G4AnyMethod.hh.

231 : fRef(f)
232 {}
S(T::* fRef)(A0, A1)
Definition: G4AnyMethod.hh:248

Referenced by G4AnyMethod::FuncRef2< S, T, A0, A1 >::Clone().

Member Function Documentation

◆ ArgType()

template<class S , class T , class A0 , class A1 >
virtual const std::type_info & G4AnyMethod::FuncRef2< S, T, A0, A1 >::ArgType ( size_t  i) const
inlinevirtual

Implements G4AnyMethod::Placeholder.

Definition at line 244 of file G4AnyMethod.hh.

245 {
246 return i == 0 ? typeid(A0) : typeid(A1);
247 }

◆ Clone()

template<class S , class T , class A0 , class A1 >
virtual Placeholder * G4AnyMethod::FuncRef2< S, T, A0, A1 >::Clone ( ) const
inlinevirtual

◆ operator()() [1/2]

template<class S , class T , class A0 , class A1 >
virtual void G4AnyMethod::FuncRef2< S, T, A0, A1 >::operator() ( void *  )
inlinevirtual

Implements G4AnyMethod::Placeholder.

Definition at line 234 of file G4AnyMethod.hh.

234{ throw G4BadArgument(); }

◆ operator()() [2/2]

template<class S , class T , class A0 , class A1 >
virtual void G4AnyMethod::FuncRef2< S, T, A0, A1 >::operator() ( void *  obj,
const std::string &  s0 
)
inlinevirtual

Implements G4AnyMethod::Placeholder.

Definition at line 235 of file G4AnyMethod.hh.

236 {
237 nakedA0 a0;
238 nakedA1 a1;
239 std::stringstream strs(s0);
240 strs >> a0 >> a1;
241 ((T*) obj->*fRef)(a0, a1);
242 }
const G4double a0
remove_const< typenameremove_reference< A0 >::type >::type nakedA0
Definition: G4AnyMethod.hh:226
remove_const< typenameremove_reference< A1 >::type >::type nakedA1
Definition: G4AnyMethod.hh:228

References a0, G4AnyMethod::FuncRef2< S, T, A0, A1 >::fRef, and G4InuclParticleNames::s0.

Field Documentation

◆ fRef

template<class S , class T , class A0 , class A1 >
S(T::* G4AnyMethod::FuncRef2< S, T, A0, A1 >::fRef) (A0, A1)

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