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

Public Types

typedef remove_reference< A0 >::type nakedA0
 

Public Member Functions

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

Public Attributes

S(T::* fRef )(A0)
 

Detailed Description

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

Definition at line 174 of file G4AnyMethod.hh.

Member Typedef Documentation

◆ nakedA0

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

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

177 : fRef(f) {}

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

191  {
192  return typeid(A0);
193  }

◆ Clone()

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

Implements G4AnyMethod::Placeholder.

Definition at line 188 of file G4AnyMethod.hh.

188  {
189  return new FuncRef1(fRef);
190  }
FuncRef1(S(T::*f)(A0))
Definition: G4AnyMethod.hh:177

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

179  {
180  throw G4BadArgument();
181  }
Here is the call graph for this function:

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

182  {
183  nakedA0 a0;
184  std::stringstream strs(s0);
185  strs >> a0;
186  ((T*)obj->*fRef)(a0);
187  }
const G4double a0
remove_reference< A0 >::type nakedA0
Definition: G4AnyMethod.hh:175

Member Data Documentation

◆ fRef

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

Definition at line 194 of file G4AnyMethod.hh.


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