Geant4-11
Public Member Functions | Data Fields
G4AnyMethod::FuncRef< S, T > Struct Template Referenceabstract
Inheritance diagram for G4AnyMethod::FuncRef< S, T >:
G4AnyMethod::Placeholder

Public Member Functions

virtual const std::type_info & ArgType (size_t) const =0
 
virtual const std::type_info & ArgType (std::size_t) const
 
virtual PlaceholderClone () const
 
 FuncRef (S(T::*f)())
 
virtual void operator() (void *, const std::string &)
 
virtual void operator() (void *obj)
 

Data Fields

S(T::* fRef )()
 

Detailed Description

template<class S, class T>
struct G4AnyMethod::FuncRef< S, T >

Definition at line 180 of file G4AnyMethod.hh.

Constructor & Destructor Documentation

◆ FuncRef()

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

Definition at line 182 of file G4AnyMethod.hh.

183 : fRef(f)
184 {}

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

Member Function Documentation

◆ ArgType() [1/2]

virtual const std::type_info & G4AnyMethod::Placeholder::ArgType ( size_t  ) const
pure virtualinherited

◆ ArgType() [2/2]

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

Definition at line 192 of file G4AnyMethod.hh.

193 {
194 return typeid(void);
195 }

◆ Clone()

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

Implements G4AnyMethod::Placeholder.

Definition at line 191 of file G4AnyMethod.hh.

191{ return new FuncRef(fRef); }

References G4AnyMethod::FuncRef< S, T >::fRef, and G4AnyMethod::FuncRef< S, T >::FuncRef().

◆ operator()() [1/2]

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

Implements G4AnyMethod::Placeholder.

Definition at line 187 of file G4AnyMethod.hh.

188 {
189 throw G4BadArgument();
190 }

◆ operator()() [2/2]

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

Implements G4AnyMethod::Placeholder.

Definition at line 186 of file G4AnyMethod.hh.

186{ ((T*) obj->*fRef)(); }

References G4AnyMethod::FuncRef< S, T >::fRef.

Field Documentation

◆ fRef

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

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