16#ifndef SIMICS_SYSTEMC_INSTRUMENTATION_TOOL_CONTROLLER_H
17#define SIMICS_SYSTEMC_INSTRUMENTATION_TOOL_CONTROLLER_H
22#pragma warning(disable:4503)
25#include <simics/cc-api.h>
28#include <simics/simulator-iface/instrumentation-tool.h>
36#define internal_DISPATCH_TOOL_CHAIN_NONNULL(controller, iface_type, func, ...)\
38 for (auto c : controller->get_connections()) { \
41 auto iface = c->template get_interface<iface_type>(); \
44 auto functions = c->functions(); \
45 if (!functions.empty()) { \
46 auto f = std::find(functions.begin(), functions.end(), #func); \
47 if (f == functions.end()) \
50 iface->func(__VA_ARGS__); \
54#define DISPATCH_TOOL_CHAIN(controller, iface_type, func, ...) \
56 namespace ssi = simics::systemc::instrumentation; \
57 using state_t = ssi::ToolController::ConnectionListState; \
59 && controller->get_connections_state() != state_t::EMPTY) \
60 internal_DISPATCH_TOOL_CHAIN_NONNULL(controller, iface_type, \
61 func, ##__VA_ARGS__); \
64#define DISPATCH_TOOL_CHAIN_THIS(iface_type, func, ...) \
65 internal_DISPATCH_TOOL_CHAIN_NONNULL(this, iface_type, func, \
70namespace instrumentation {
101 std::vector<ToolConnectionInterface *> connections_;
103 CallbackInterface *callback_;
Definition: provider_controller_interface.h:32
Definition: pci_bus_interface.h:24