gem5 [DEVELOP-FOR-25.0]
Loading...
Searching...
No Matches
gem5::ProbeListenerArg< T, Arg > Class Template Reference

ProbeListenerArg generates a listener for the class of Arg and the class type T which is the class containing the function that notify will call. More...

#include <probe.hh>

Inheritance diagram for gem5::ProbeListenerArg< T, Arg >:
gem5::ProbeListenerArgBase< Arg > gem5::ProbeListener

Public Member Functions

 ProbeListenerArg (T *obj, std::string name, void(T::*func)(const Arg &))
 
void notify (const Arg &val) override
 called when the ProbePoint calls notify.
 
- Public Member Functions inherited from gem5::ProbeListenerArgBase< Arg >
 ProbeListenerArgBase (std::string name)
 
- Public Member Functions inherited from gem5::ProbeListener
 ProbeListener (std::string _name)
 
virtual ~ProbeListener ()=default
 
 ProbeListener (const ProbeListener &other)=delete
 
ProbeListeneroperator= (const ProbeListener &other)=delete
 
 ProbeListener (ProbeListener &&other) noexcept=delete
 
ProbeListeneroperator= (ProbeListener &&other) noexcept=delete
 
const std::string & getName () const
 

Private Attributes

T * object
 
void(T::* function )(const Arg &)
 

Additional Inherited Members

- Protected Attributes inherited from gem5::ProbeListener
const std::string name
 

Detailed Description

template<class T, class Arg>
class gem5::ProbeListenerArg< T, Arg >

ProbeListenerArg generates a listener for the class of Arg and the class type T which is the class containing the function that notify will call.

Note that the function is passed as a pointer on construction.

Definition at line 238 of file probe.hh.

Constructor & Destructor Documentation

◆ ProbeListenerArg()

template<class T, class Arg>
gem5::ProbeListenerArg< T, Arg >::ProbeListenerArg ( T * obj,
std::string name,
void(T::* func )(const Arg &) )
inline
Parameters
objthe class of type Tcontaining the method to call on notify.
namethe name of the ProbePoint to add this listener to.
funca pointer to the function on obj (called on notify).

Definition at line 250 of file probe.hh.

Member Function Documentation

◆ notify()

template<class T, class Arg>
void gem5::ProbeListenerArg< T, Arg >::notify ( const Arg & val)
inlineoverridevirtual

called when the ProbePoint calls notify.

This is a shim through to the function passed during construction.

Parameters
valthe argument value to pass.

Implements gem5::ProbeListenerArgBase< Arg >.

Definition at line 261 of file probe.hh.

Member Data Documentation

◆ function

template<class T, class Arg>
void(T::* gem5::ProbeListenerArg< T, Arg >::function) (const Arg &)
private

Definition at line 242 of file probe.hh.

◆ object

template<class T, class Arg>
T* gem5::ProbeListenerArg< T, Arg >::object
private

Definition at line 241 of file probe.hh.


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

Generated on Mon May 26 2025 09:19:24 for gem5 by doxygen 1.13.2