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

Public Types

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

Public Member Functions

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

Data Fields

S(T::* fRef )(A0)
 

Detailed Description

template<class S, class T, class A0>
struct G4AnyMethod::FuncRef1< S, T, A0 >

Definition at line 200 of file G4AnyMethod.hh.

Member Typedef Documentation

◆ nakedA0

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

Definition at line 203 of file G4AnyMethod.hh.

Constructor & Destructor Documentation

◆ FuncRef1()

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

Definition at line 205 of file G4AnyMethod.hh.

206 : fRef(f)
207 {}

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

Member Function Documentation

◆ ArgType()

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

Implements G4AnyMethod::Placeholder.

Definition at line 218 of file G4AnyMethod.hh.

218{ return typeid(A0); }

◆ Clone()

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

◆ operator()() [1/2]

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

Implements G4AnyMethod::Placeholder.

Definition at line 209 of file G4AnyMethod.hh.

209{ throw G4BadArgument(); }

◆ operator()() [2/2]

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

Implements G4AnyMethod::Placeholder.

Definition at line 210 of file G4AnyMethod.hh.

211 {
212 nakedA0 a0;
213 std::stringstream strs(s0);
214 strs >> a0;
215 ((T*) obj->*fRef)(a0);
216 }
const G4double a0
remove_const< typenameremove_reference< A0 >::type >::type nakedA0
Definition: G4AnyMethod.hh:203

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

Field Documentation

◆ fRef

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

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