20 Commits

Author SHA1 Message Date
Dawid Drozd
f7dd4172cf Improve Travis script
Fixed after reordering project structure
2018-07-31 10:26:27 +02:00
Dawid Drozd
685562c632 Reorganize project layout
Inspired by: https://www.youtube.com/watch?v=6sWec7b0JIc
2018-07-24 12:47:10 +02:00
Dawid Drozd
40d1d64878 Remove Catch2 submodule
Switch to own dependency
2018-07-24 12:45:55 +02:00
Dawid Drozd
caec657b07 Fix GCC compile 2017-12-07 12:07:24 +01:00
Dawid Drozd
b41c6254ff Update compile flags 2017-12-05 13:14:20 +01:00
Dawid Drozd
636b63865d Fix compiler flags 2017-12-04 13:46:51 +01:00
Dawid Drozd
c02c69c083 Add tests 2017-09-10 15:03:06 +02:00
Dawid Drozd
509bb577be Update README 2017-09-10 14:32:21 +02:00
Dawid Drozd
c4f0b8b233 Update cmake flags 2017-09-10 13:05:36 +02:00
Dawid Drozd
9126286acc Add transaction safety
Fix case when during notification we start add/remove listeners.
2017-08-27 22:59:40 +02:00
Dawid Drozd
fc1dbe335f Update EventBus to 2.1.0 inspired by Boost::MSM
I was wondering if it is a good step for EventBus. Of course, it will break back
compatibility again as well as it was when changing v1 -> v2, but this change is
smaller. Those changes were inspired by Boost::MSM how it handles events.

Why i decided to change:

+ It will prevent from bugs like typo in Event string eg. Event<int>{"text"}
+ If we want to change signature of Event, we won't have to update all listeners
and their signature
+ Less includes for listener. Simply in our class header we will have eg.
pointer/ref to event type not to all args
+ Strongly typed (this is always better)
+ Storing event for future reuse
+ More easy to introduce thread safe EventBus in future
+ EventBus is more simple
+ const Event forbids some kind of communication. Eg. passing and modifying
reference
+ Less errors when using std::bind

- Breaking back compatibility
- Need fixes in projects that using this lib
- Someone can add methods etc. to Event :(
- We can't generate easily multiple "types" of events like in 'for' loop
- Worst performance (still not such bad as CCNotificationCenter)
2017-08-26 13:28:45 +02:00
Dawid Drozd
23ab070061 Add EventBus::notify for simple strings 2017-08-25 16:02:25 +02:00
Dawid Drozd
257cc90c86 Add test for checking validating different notifications keys 2017-08-25 11:38:13 +02:00
Dawid Drozd
8f0b5f3b08 Fix test 2017-08-15 21:48:09 +02:00
Dawid Drozd
2d14ca521d Update documentation and naming 2017-08-06 17:24:13 +02:00
Dawid Drozd
ffbf4b91a9 Update compile flags 2017-08-06 17:13:00 +02:00
Dawid Drozd
94973b5779 EventBus 2.0.0 2017-08-06 11:22:59 +02:00
Dawid Drozd
1db41d903a Add new implementation of EventBus
Simply new version breaks back compability and simply is better ;)
2017-08-06 00:14:35 +02:00
Dawid Drozd
7b81d56794 Add some unit tests 2017-08-05 12:15:33 +02:00
Dawid Drozd
0012c21709 Add CATCH unit test library v1.9.6 2017-08-05 11:42:54 +02:00