Geant4  10.02.p03
G4AnyMethod::FuncRef2< S, T, A0, A1 > Struct Template Reference
Inheritance diagram for G4AnyMethod::FuncRef2< S, T, A0, A1 >:
Collaboration diagram for G4AnyMethod::FuncRef2< S, T, A0, A1 >:

Public Types

typedef remove_reference< A0 >::type nakedA0
 
typedef remove_reference< A1 >::type nakedA1
 

Public Member Functions

 FuncRef2 (S(T::*f)(A0, A1))
 
virtual void operator() (void *)
 
virtual void operator() (void *obj, const std::string &s0)
 
virtual PlaceholderClone () const
 
virtual const std::type_info & ArgType (size_t i) const
 
- Public Member Functions inherited from G4AnyMethod::Placeholder
 Placeholder ()
 
virtual ~Placeholder ()
 

Public Attributes

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 197 of file G4AnyMethod.hh.

Member Typedef Documentation

◆ nakedA0

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

Definition at line 198 of file G4AnyMethod.hh.

◆ nakedA1

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

Definition at line 199 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 201 of file G4AnyMethod.hh.

201 : fRef(f) {}
S(T::* fRef)(A0, A1)
Definition: G4AnyMethod.hh:219

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 216 of file G4AnyMethod.hh.

216  {
217  return i == 0 ? typeid(A0) : typeid(A1);
218  }

◆ Clone()

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

Implements G4AnyMethod::Placeholder.

Definition at line 213 of file G4AnyMethod.hh.

213  {
214  return new FuncRef2(fRef);
215  }
FuncRef2(S(T::*f)(A0, A1))
Definition: G4AnyMethod.hh:201
S(T::* fRef)(A0, A1)
Definition: G4AnyMethod.hh:219

◆ 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 203 of file G4AnyMethod.hh.

203  {
204  throw G4BadArgument();
205  }
Here is the call graph for this function:

◆ 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 206 of file G4AnyMethod.hh.

206  {
207  nakedA0 a0;
208  nakedA1 a1;
209  std::stringstream strs(s0);
210  strs >> a0 >> a1;
211  ((T*)obj->*fRef)(a0, a1);
212  }
const G4double a0
static const G4double a1
remove_reference< A0 >::type nakedA0
Definition: G4AnyMethod.hh:198
remove_reference< A1 >::type nakedA1
Definition: G4AnyMethod.hh:199
S(T::* fRef)(A0, A1)
Definition: G4AnyMethod.hh:219

Member Data Documentation

◆ fRef

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

Definition at line 219 of file G4AnyMethod.hh.


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