![]() |
HAL
|
#include <event_handler.h>
Public Member Functions | |
EventHandler () | |
NETLIST_API void | event_enable_all (bool flag) |
NETLIST_API void | notify (NetlistEvent::event ev, Netlist *netlist, u32 associated_data=0xFFFFFFFF) |
NETLIST_API void | notify (ModuleEvent::event ev, Module *module, u32 associated_data=0xFFFFFFFF) |
NETLIST_API void | notify (GateEvent::event ev, Gate *gate, u32 associated_data=0xFFFFFFFF) |
NETLIST_API void | notify (NetEvent::event ev, Net *net, u32 associated_data=0xFFFFFFFF) |
NETLIST_API void | notify (GroupingEvent::event ev, Grouping *grouping, u32 associated_data=0xFFFFFFFF) |
NETLIST_API void | register_callback (const std::string &name, std::function< void(NetlistEvent::event e, Netlist *netlist, u32 associated_data)> function) |
NETLIST_API void | register_callback (const std::string &name, std::function< void(ModuleEvent::event e, Module *module, u32 associated_data)> function) |
NETLIST_API void | register_callback (const std::string &name, std::function< void(GateEvent::event e, Gate *, u32 associated_data)> function) |
NETLIST_API void | register_callback (const std::string &name, std::function< void(NetEvent::event e, Net *, u32 associated_data)> function) |
NETLIST_API void | register_callback (const std::string &name, std::function< void(GroupingEvent::event e, Grouping *grouping, u32 associated_data)> function) |
NETLIST_API void | unregister_callback (const std::string &name) |
Definition at line 145 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(), and test_multiple::netlist.
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(), and hal::Module::set_type().
NETLIST_API 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. |
NETLIST_API 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. |
NETLIST_API 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. |
NETLIST_API 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. |
NETLIST_API 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. |
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().