42 #include "debug/ProbeVerbose.hh" 43 #include "params/ProbeListenerObject.hh" 55 manager(params->manager->getProbeManager())
79 ProbeListenerObjectParams::create()
87 DPRINTFR(ProbeVerbose,
"Probes: Call to addListener to \"%s\" on %s.\n", pointName, object->name());
89 for (
auto p = points.begin();
p != points.end(); ++
p) {
90 if ((*p)->getName() == pointName) {
91 (*p)->addListener(&listener);
96 DPRINTFR(ProbeVerbose,
"Probes: Call to addListener to \"%s\" on %s failed, no such point.\n", pointName, object->name());
104 DPRINTFR(ProbeVerbose,
"Probes: Call to removeListener from \"%s\" on %s.\n", pointName, object->name());
105 bool removed =
false;
106 for (
auto p = points.begin();
p != points.end(); ++
p) {
107 if ((*p)->getName() == pointName) {
108 (*p)->removeListener(&listener);
113 DPRINTFR(ProbeVerbose,
"Probes: Call to removeListener from \"%s\" on %s failed, no such point.\n", pointName, object->name());
121 DPRINTFR(ProbeVerbose,
"Probes: Call to addPoint \"%s\" to %s.\n", point.
getName(),
object->name());
123 for (
auto p = points.begin();
p != points.end(); ++
p) {
124 if ((*p)->getName() == point.
getName()) {
125 DPRINTFR(ProbeVerbose,
"Probes: Call to addPoint \"%s\" to %s failed, already added.\n", point.
getName(),
object->name());
129 points.push_back(&point);
bool removeListener(std::string pointName, ProbeListener &listener)
Remove a ProbeListener from the ProbePoint named by pointName.
virtual ~ProbeListenerObject()
const std::string & name()
ProbeListener base class; again used to simplify use of ProbePoints in containers and used as to defi...
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.
ProbeListenerObject(const ProbeListenerObjectParams *params)
void addPoint(ProbePoint &point)
Add a ProbePoint to this SimObject ProbeManager.
std::string getName() const
This class is a minimal wrapper around SimObject.
virtual const std::string name() const
std::vector< ProbeListener * > listeners
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.