|
HAL
v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
#include <hal_core/netlist/event_system/event_handler.h>

Public Member Functions | |
| EventHandler () | |
| void | event_enable_all (bool flag) |
| void | notify (NetlistEvent::event ev, Netlist *netlist, u32 associated_data=0xFFFFFFFF) |
| void | notify (ModuleEvent::event ev, Module *module, u32 associated_data=0xFFFFFFFF) |
| void | notify (GateEvent::event ev, Gate *gate, u32 associated_data=0xFFFFFFFF) |
| void | notify (NetEvent::event ev, Net *net, u32 associated_data=0xFFFFFFFF) |
| void | notify (GroupingEvent::event ev, Grouping *grouping, u32 associated_data=0xFFFFFFFF) |
| void | register_callback (const std::string &name, std::function< void(NetlistEvent::event e, Netlist *netlist, u32 associated_data)> function) |
| void | register_callback (const std::string &name, std::function< void(ModuleEvent::event e, Module *module, u32 associated_data)> function) |
| void | register_callback (const std::string &name, std::function< void(GateEvent::event e, Gate *, u32 associated_data)> function) |
| void | register_callback (const std::string &name, std::function< void(NetEvent::event e, Net *, u32 associated_data)> function) |
| void | register_callback (const std::string &name, std::function< void(GroupingEvent::event e, Grouping *grouping, u32 associated_data)> function) |
| void | unregister_callback (const std::string &name) |
The event handler distributes the events emitted by the netlist and its elements to all registered callbacks. Callbacks are registered per event type and can be enabled or disabled individually.
Definition at line 164 of file event_handler.h.
| hal::EventHandler::EventHandler | ( | ) |
Definition at line 68 of file event_handler.cpp.
| void hal::EventHandler::event_enable_all | ( | bool | flag | ) |
Enables/disables callbacks for all handler.
Enabled by default.
| [in] | flag | - true to enable, false to disable. |
Definition at line 72 of file event_handler.cpp.
| void hal::EventHandler::notify | ( | GateEvent::event | ev, |
| Gate * | gate, | ||
| u32 | associated_data = 0xFFFFFFFF |
||
| ) |
Executes all registered callbacks.
| [in] | ev | - the event which occured. |
| [in] | gate | - The affected object. |
| [in] | associated_data | - may have a meaning depending on the event type. |
Definition at line 90 of file event_handler.cpp.
References hal::event_log::handle_gate_event().
| void hal::EventHandler::notify | ( | GroupingEvent::event | ev, |
| Grouping * | grouping, | ||
| u32 | associated_data = 0xFFFFFFFF |
||
| ) |
Executes all registered callbacks.
| [in] | ev | - the event which occured. |
| [in] | grouping | - The affected object. |
| [in] | associated_data | - may have a meaning depending on the event type. |
Definition at line 118 of file event_handler.cpp.
References hal::event_log::handle_grouping_event().
| void hal::EventHandler::notify | ( | ModuleEvent::event | ev, |
| Module * | module, | ||
| u32 | associated_data = 0xFFFFFFFF |
||
| ) |
Executes all registered callbacks.
| [in] | ev | - the event which occured. |
| [in] | module | - The affected object. |
| [in] | associated_data | - may have a meaning depending on the event type. |
Definition at line 108 of file event_handler.cpp.
References hal::event_log::handle_module_event(), and hal::ShortestPath::module().
| void hal::EventHandler::notify | ( | NetEvent::event | ev, |
| Net * | net, | ||
| u32 | associated_data = 0xFFFFFFFF |
||
| ) |
Executes all registered callbacks.
| [in] | ev | - the event which occured. |
| [in] | net | - The affected object. |
| [in] | associated_data | - may have a meaning depending on the event type. |
Definition at line 99 of file event_handler.cpp.
References hal::event_log::handle_net_event(), and net.
| void hal::EventHandler::notify | ( | NetlistEvent::event | ev, |
| Netlist * | netlist, | ||
| u32 | associated_data = 0xFFFFFFFF |
||
| ) |
Executes all registered callbacks.
| [in] | ev | - the event which occured. |
| [in] | netlist | - The affected object. |
| [in] | associated_data | - may have a meaning depending on the event type. |
Definition at line 81 of file event_handler.cpp.
References hal::event_log::handle_netlist_event().
Referenced by hal::PinChangedEvent::send(), hal::Grouping::set_color(), hal::Module::set_name(), hal::Net::set_name(), hal::Grouping::set_name(), hal::Module::set_parent_module(), hal::Module::set_type(), and hal::PinChangedBulkScope::~PinChangedBulkScope().
| void hal::EventHandler::register_callback | ( | const std::string & | name, |
| std::function< void(GateEvent::event e, Gate *, u32 associated_data)> | function | ||
| ) |
Registers a callback function.
| [in] | name | - name of the callback, used for callback removal. |
| [in] | function | - The callback function. |
Definition at line 127 of file event_handler.cpp.
References name.
| void hal::EventHandler::register_callback | ( | const std::string & | name, |
| std::function< void(GroupingEvent::event e, Grouping *grouping, u32 associated_data)> | function | ||
| ) |
Registers a callback function.
| [in] | name | - name of the callback, used for callback removal. |
| [in] | function | - The callback function. |
Definition at line 132 of file event_handler.cpp.
References name.
| void hal::EventHandler::register_callback | ( | const std::string & | name, |
| std::function< void(ModuleEvent::event e, Module *module, u32 associated_data)> | function | ||
| ) |
Registers a callback function.
| [in] | name | - name of the callback, used for callback removal. |
| [in] | function | - The callback function. |
Definition at line 137 of file event_handler.cpp.
References name.
| void hal::EventHandler::register_callback | ( | const std::string & | name, |
| std::function< void(NetEvent::event e, Net *, u32 associated_data)> | function | ||
| ) |
Registers a callback function.
| [in] | name | - name of the callback, used for callback removal. |
| [in] | function | - The callback function. |
Definition at line 142 of file event_handler.cpp.
References name.
| void hal::EventHandler::register_callback | ( | const std::string & | name, |
| std::function< void(NetlistEvent::event e, Netlist *netlist, u32 associated_data)> | function | ||
| ) |
Registers a callback function.
| [in] | name | - name of the callback, used for callback removal. |
| [in] | function | - The callback function. |
Definition at line 147 of file event_handler.cpp.
References name.
Referenced by hal::NetlistRelay::registerNetlistCallbacks().
| void hal::EventHandler::unregister_callback | ( | const std::string & | name | ) |
Removes a callback function.
| [in] | name | - name of the callback. |
Definition at line 152 of file event_handler.cpp.
References name.
Referenced by hal::NetlistRelay::unregisterNetlistCallbacks().