18 Commits

Author SHA1 Message Date
Dawid Drozd
5408f09d03 Remove checking C++11 support by definied var
On windows it doesn't work should check by using check features

https://stackoverflow.com/questions/14131454/visual-studio-2012-cplusplus-and-c-11
2017-12-05 14:56:11 +01:00
Dawid Drozd
b370565b37 Remove not needed const 2017-12-05 14:34:30 +01:00
Dawid Drozd
4d43ff4483 Add deprecated for BusAttorney 2017-12-04 13:24:44 +01:00
Dawid Drozd
74d3b3ee60 Improve BusAttorney 2017-11-24 12:54:17 +01:00
Dawid Drozd
3ddb5ac7c5 Improve Event::Collector::getBus
Some of people make such thing:

listener.getBus().listen<T>()...

And they thought that listening with our listener.
So need to fix bad conceptual mistake.
2017-11-24 12:42:50 +01:00
Dawid Drozd
0d34eb9041 Fix nested transaction
Quick fix for now. Probably we need better solution.
2017-08-28 22:54:11 +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
f7ab55a3fa Add EventCollector::getBus
We need sometimes to access to the bus. Also thanks to this we can reduce 1
field
2017-08-27 19:53:29 +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
71530ac7f5 Fix warnings from clang 2017-08-15 20:26:38 +02:00
Dawid Drozd
910f9816e8 Refactoring 2017-08-06 17:30:06 +02:00
Dawid Drozd
2d14ca521d Update documentation and naming 2017-08-06 17:24:13 +02:00
Dawid Drozd
e8f84a6e09 Update minimum cpp version 2017-08-06 17:14:14 +02:00
Dawid Drozd
94973b5779 EventBus 2.0.0 2017-08-06 11:22:59 +02:00
Dawid Drozd
630e220d43 Remove old Notifier aka EventBus v1.x 2017-08-06 10:51:07 +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
0514ffd2db Improve library as standalone 2017-08-05 02:31:42 +02:00