NX Horizon - Event Bus for Delphi
I have published initial release of NX Horizon Event Bus for Delphi as Open Source on GitHub.
Features
- implements the publish/subscribe pattern, decoupling publishers and subscribers
- events are categorized by type
- any Delphi type can be used as an event
- supports four types of event delivery: synchronous, asynchronous, synchronous in the context of the main thread, and asynchronous in the context of the main thread
- provides generic record and reference-counted class wrappers for easier usage and management of existing types as events
- simple in both implementation and usage
- fast
- full thread safety
https://github.com/dalijap/nx-horizon
Do you have any examples of using NX Horizon with custom classes/records as event types?
ReplyDeleteThanks
No, I don't have specific examples. But the principles are the same, just event types are differ. You can find declarations for different event types in README
Deletetype
TFoo = class
...
end;
TOtherFoo = type TFoo;
TIntegerEvent = type Integer;
TStringEvent = type string;
TFooEvent = INxEvent<TFoo>;
TOtherFooEvent = INxEvent<TOtherFoo>;
TRectEvent = type TRect;
TOtherRectEvent = type TRect;