61 #ifndef __SIM_PROBE_PROBE_HH__
62 #define __SIM_PROBE_PROBE_HH__
74 class ProbeListenerObjectParams;
84 namespace ProbePoints {
216 template <
class T,
class Arg>
221 void (T::*
function)(
const Arg &);
240 virtual void notify(
const Arg &
val) { (
object->*
function)(val); }
250 template <
typename Arg>
295 #endif//__SIM_PROBE_PROBE_HH__
bool removeListener(std::string pointName, ProbeListener &listener)
Remove a ProbeListener from the ProbePoint named by pointName.
virtual ~ProbeListenerObject()
#define M5_CLASS_VAR_USED
ProbeListener base class; again used to simplify use of ProbePoints in containers and used as to defi...
virtual void notify(const Arg &val)=0
std::string getName() const
const Params * params() const
void notify(const Arg &arg)
called at the ProbePoint call site, passes arg to each listener.
ProbePointArg(ProbeManager *manager, std::string name)
virtual void notify(const Arg &val)
called when the ProbePoint calls notify.
ProbePoint(ProbeManager *manager, const std::string &name)
ProbeManager is a conduit class that lives on each SimObject, and is used to match up probe listeners...
bool addListener(std::string pointName, ProbeListener &listener)
Add a ProbeListener to the ProbePoint named by pointName.
ProbeManager * getProbeManager()
void addPoint(ProbePoint &point)
Add a ProbePoint to this SimObject ProbeManager.
ProbeListenerObject(const ProbeListenerObjectParams *params)
ProbeListenerArgBase is used to define the base interface to a ProbeListenerArg (i.e the notify method on specific type).
virtual void removeListener(ProbeListener *listener)=0
std::vector< ProbePoint * > points
Vector for name look-up.
This class is a minimal wrapper around SimObject.
virtual void addListener(ProbeListener *listener)=0
ProbeListenerArg(T *obj, const std::string &name, void(T::*func)(const Arg &))
void addListener(ProbeListener *l)
adds a ProbeListener to this ProbePoints notify list.
const M5_CLASS_VAR_USED SimObject * object
Required for sensible debug messages.
std::vector< ProbeListener * > listeners
ProbeListenerArgBase(ProbeManager *pm, const std::string &name)
ProbePointArg generates a point for the class of Arg.
ProbeManager(SimObject *obj)
void removeListener(ProbeListener *l)
remove a ProbeListener from this ProbePoints notify list.
std::vector< ProbeListenerArgBase< Arg > * > listeners
The attached listeners.
void(T::* function)(const Arg &)
ProbeListenerArg generates a listener for the class of Arg and the class type T which is the class co...
ProbeListener base class; here to simplify things like containers containing multiple types of ProbeL...
ProbeManager *const manager
ProbeListener(ProbeManager *manager, const std::string &name)
Abstract superclass for simulation objects.