157 Commits

Author SHA1 Message Date
Dawid Drozd
cfed57a31f Update test 2020-05-01 22:13:32 +02:00
Nicolas Noble
16f2bbe613 Fixes Visual Studio 2019 compilation. 2020-04-28 16:47:21 +02:00
Dawid Drozd
de1852c639 Update README v3.0.0 2020-04-12 16:44:31 +02:00
Dawid Drozd
181b89d263 Update test 2020-04-12 14:57:09 +02:00
Dawid Drozd
69ac64a3ee Add comments 2020-04-12 14:47:05 +02:00
Dawid Drozd
9cab181cab Update Perks to shared
Maybe we would like to share perks to achieve something between event buses
2020-03-28 19:45:26 +01:00
Dawid Drozd
a58aa21934 Fix implicit move that could lead to UB
In some scenarios we could end up with UB. I added simple example in test case where we add class
instance to vector and as we know it may move its elements when resizing.

Maybe we could allow to move and just unlisten previous listener but this would be very annoying as
user needs to remember what would happen in every case. It is better to let user decide and force
him to think about it.
2020-03-26 11:53:05 +01:00
Dawid Drozd
b4bceafb40 Fix data race
Bad usage of condition variable
2020-03-13 09:59:50 +01:00
Dawid Drozd
35efe42884 Fix WaitPerk for dummy waiting case
It could happen that we had some events in queue but we still would wait for new events.
2020-03-12 13:59:40 +01:00
Dawid Drozd
7c63021ea3 Add integration tests
- Refactor unit tests
2020-03-12 09:48:03 +01:00
Dawid Drozd
0985cd62d2 Move test into new file layout
No code changes only moving stuff
2020-03-12 09:40:26 +01:00
Dawid Drozd
c14094d037 Add FAQ doc 2020-01-18 13:25:19 +01:00
Dawid Drozd
871db45754 Add extra assert
fail ASAP during debug
2020-01-18 13:22:46 +01:00
Dawid Drozd
d7c9690cc7 Fix Travis build
- Update Travis
- Fix option
- Update Catch2 required version to 2.10
2020-01-02 12:48:14 +01:00
Dawid Drozd
d426b68981 Add THANKS.md 2019-12-29 15:06:29 +01:00
Dawid Drozd
59683ebd08 Add tsan asan lsan msan ubsan build types
For testing and development
2019-12-29 15:02:03 +01:00
Dawid Drozd
c5756e24a8 Update needed c++ version 2019-12-29 15:00:20 +01:00
Dawid Drozd
d0d236dab0 Secure installed files
We should be able to remove installed stuff but we want to forbid changes in installed files.
Thanks to that we do not modify files by mistake directly from e.g. Clion (when we go to
header/source)
2019-12-29 13:13:34 +01:00
Dawid Drozd
2bc2858a8a New EventBus 3.0 2019-12-27 11:24:34 +01:00
Dawid Drozd
6baa41917e Update clang-format 2019-11-25 11:00:57 +01:00
Dawid Drozd
f986c6c675 Fix TagEventBus::get()
In some cases we could move our shared_ptr by mistake
2019-11-13 19:43:32 +01:00
Dawid Drozd
2bb9c3e679 Add TagEventBus 2019-10-30 17:44:52 +01:00
Dawid Drozd
890eaff178 Update encapsulation for accessing private stuff from EventBus 2019-10-30 17:28:59 +01:00
Dawid Drozd
1adbc61a03 Add extra check for waiting events
We don't want to wait for events if we already have some.
2019-10-22 22:50:36 +02:00
Dawid Drozd
55dd3937fa Fix api readability 2019-09-15 02:45:13 +02:00
Dawid Drozd
54b3fae30a Remove old EventBus 2.X and make room for 3.X 2019-09-14 23:46:12 +02:00
Dawid Drozd
018a536147 Move code from include/ to src/
I don't like to keep separate folders for public & private stuff. In my opinion this is "old"
approach. I like when header and module file are next to each other.

My choice. Installation will handle splitting public & private headers.
2019-09-14 16:05:21 +02:00
Dawid Drozd
170690ae9d Mark as 3.0.0 version
This would be next release version
2019-09-14 15:59:25 +02:00
Dawid Drozd
75443f35da Add EventBus::getStrategy
E.g. Protected strategy has some extra functions like Protected::wait
2019-09-14 15:59:02 +02:00
Dawid Drozd
026889c86c Update cpp code for move and forward 2019-09-14 15:58:02 +02:00
Dawid Drozd
8f6eb24549 Remove Subscriber and make Listener more safe
There could be not nice situation when bus dies and Listener wants to unlisten. That was easy to
achieve e.g. bad order in class fields. (Order of destruction matters)
2019-09-14 15:56:09 +02:00
Dawid Drozd
0efc4264fc Update required C++ to 17 2019-09-14 15:51:47 +02:00
Dawid Drozd
412bc653aa Add new way of installing public headers 2019-09-14 15:11:21 +02:00
Dawid Drozd
be33318242 Code format 2019-09-14 15:01:06 +02:00
Dawid Drozd
caa2b3e9ff Add dummy Listener without assigned bus
Thanks to that we can store Listener without ASAP initialization with bus
2019-09-14 14:59:40 +02:00
Dawid Drozd
48306cfc96 Update performance/CMakeLists 2019-06-30 21:10:25 +02:00
Dawid Drozd
c6a39841c7 Update performance test for new EventBus 2019-06-30 21:09:50 +02:00
Dawid Drozd
2d2733afde Add preview of EventBus 3.0 2019-06-30 20:12:50 +02:00
Dawid Drozd
7e6bb32e27 Update CXX_STANDARD to C++17 and minimum required cmake version to 3.11 2019-06-30 14:14:43 +02:00
Dawid Drozd
02b45437b6 Update clang-format config file and reformat whole code according to it
- Clang-tidy applied
- No logic changes, just code style improvement.
2019-06-29 11:27:38 +02:00
Dawid Drozd
cf44a59ca3 Rename Dexode::Internal::type_id to Dexode::Internal::event_id 2019-06-29 11:10:02 +02:00
Dawid Drozd
cb4438bee1 Bump version to 2.6.0 v2.6.0 2019-06-26 08:09:34 +02:00
Dawid Drozd
b0428e814f Update Catch2 for Travis from 2.6.0 to 2.9.1 2019-06-26 08:09:34 +02:00
Dawid Drozd
d51be92632 Add AsyncEventBus::wait() function 2019-06-26 08:09:34 +02:00
Dawid Drozd
3b908bdaa8 Fix Travis build
Add more interesting build configurations also.
2019-06-26 08:09:31 +02:00
Dawid Drozd
0362712fc3 Update google benchmark submodule to v1.5.0 2019-06-14 07:12:23 +02:00
Dawid Drozd
66d408926f Update AsyncEventBus::consume to be more "logic" 2019-06-13 19:39:49 +02:00
Dawid Drozd
6c9ba0640c Fix enable_cpack() call
We were missing argument (maybe I resolved conflict badly)
We don't need option this could be deduced from CPACK_GENERATOR variable

[MINOR]
2019-04-21 14:36:56 +02:00
Dawid Drozd
3f39010983 Update README 2019-04-21 14:35:04 +02:00
Dawid Drozd
1156e0adfa Remove not needed cpack config
This was previously moved to lib/CMakeLists.txt
[PATCH]
2019-04-21 14:34:50 +02:00
Dawid Drozd
5f715c785b
Merge pull request #25 from Aang23/master
Update CPack support
2019-04-21 13:41:04 +02:00
Dawid Drozd
9fe2ae68f1
Merge branch 'master' into master 2019-04-21 13:14:30 +02:00
Aang23
492158ba80
Update README.md 2019-04-12 13:37:35 +02:00
Aang23
afc8cea23c Update and fix CPack 2019-04-12 13:19:16 +02:00
Aang23
427652522e Split and update CPack configuration 2019-04-11 21:05:56 +02:00
Aang23
a8669fddc8 Update CPack and exclude /lib 2019-04-11 21:05:56 +02:00
Aang23
f45b106dab Add CPack RPM/DEB/TGZ support 2019-04-11 21:05:56 +02:00
Aang23
1146cebc55 Split and update CPack configuration 2019-04-11 10:33:58 +02:00
Aang23
d0bb961c2b Update CPack and exclude /lib 2019-04-09 22:23:09 +02:00
Aang23
d33292f820 Add CPack RPM/DEB/TGZ support 2019-04-09 22:15:41 +02:00
Dawid Drozd
89a376f6cf Update catch2 for travis 2019-03-31 00:28:43 +01:00
Dawid Drozd
aa96ba493d Add AsyncEventBus::notify 2019-03-30 15:32:08 +01:00
Dawid Drozd
2edc809a74 Update code format according to clang-format
No code changes
2019-03-30 15:31:18 +01:00
Dawid Drozd
bc466a3d6b Update dev project cmake 2019-03-30 15:28:17 +01:00
Dawid Drozd
0d2fa6ef85 Update required Catch2 to 2.6 2019-03-30 15:12:09 +01:00
Dawid Drozd
6fdf79795e Update README 2019-03-15 15:50:37 +01:00
Dawid Drozd
42c690e774 Fix gcc warning v2.4.1 2019-01-20 20:47:53 +01:00
Dawid Drozd
34902c481d Fix type_id<T>() helper function for Visual Studio
Issue: #19

Visual Studio optimize not so portable version of type_id<T>()
so each time we get same id for different types.

Added small test to check this behavior in future.
2019-01-20 20:39:07 +01:00
Dawid Drozd
d10e3bf57b Update README
[skip-ci]

Change-Id: I21e309999fb9549ca5e524e52cfd55921921c512
2018-10-15 14:48:35 +01:00
Dawid Drozd
eddf87ae48 Add contributing doc
[ci skip]

Change-Id: I53dde8bbfcf6c339192e0dd8aefdf219bd694b6f
2018-10-15 14:48:35 +01:00
Dawid Drozd
b28aeef9f2 Update issue templates
Change-Id: Iefdf090506a92ca9e6308e59798797b9a8b8d73c
2018-10-15 14:48:35 +01:00
Dawid Drozd
8c79729275
Rename CODE_OF_CONDUCT.md to docs/CODE_OF_CONDUCT.md 2018-10-08 15:13:49 +01:00
Dawid Drozd
1a3ad85ef5
Create CODE_OF_CONDUCT.md 2018-10-08 15:13:14 +01:00
Dawid Drozd
f06ddc4fc8 Update README 2018-09-09 13:47:16 +02:00
Dawid Drozd
7cf4465168 Add AsyncEventBus
Now it is possible to schedule events from different threads.
v2.4.0
2018-09-08 19:56:19 +02:00
Dawid Drozd
c53fc6fabb Remove some trash 2018-09-08 16:57:51 +02:00
Dawid Drozd
52d85fcfea Update catch version for travis 2018-09-06 21:05:54 +02:00
Dawid Drozd
3c282b5139 Update Catch2 to version at least 2.3
They broke target name ;(
2018-09-05 20:44:44 +02:00
Dawid Drozd
96dcc67cab Bump version v2.3.0 2018-07-31 11:34:10 +02:00
Dawid Drozd
3688c145cb Reorganize project structure
commit f7dd4172cf535cf52601a8819cf5c8bfabcd1fe4
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 31 10:26:27 2018 +0200

    Improve Travis script

    Fixed after reordering project structure

commit d054e5c91762da15defa458404e355d7c670e301
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Mon Jul 30 15:11:21 2018 +0200

    Update Travis CI for linux and OSX

commit 63395f5a7e3dd9f2a52b2d6a254da89ec1d6e5e9
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Fri Jul 27 14:38:40 2018 +0200

    Secure EventBus from wrong usage

    For example user previously could do such thing:

    bus.listen<const MyEvent>(...)

    bus.listen<MyEvent>(...)

    Those we 2 different events :/

commit f9195316d3ba6313ee425e3194b65b32fe52d641
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Thu Jul 26 12:44:17 2018 +0200

    Update for better managing Debug/Release

    Updated project for easy switch between debug/release versions of library

    Thanks to that we can do only find_package and don't have to care about if's switching between
    debug/release

    Thanks: https://github.com/forexample/package-example

commit 7d708959d9e96176875ca882f0f69a72622added
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Wed Jul 25 13:45:55 2018 +0200

    Update clang-format style

commit beb1d3b863379490f321e43f3e42ab272954ea67
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 16:05:16 2018 +0200

    Add some docs

commit ca450dfeee2d4bc604bbb9bf0599f373c21a4173
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 15:49:52 2018 +0200

    Remove not needed includes

commit 6473b80e8e60408675bcc4adc88653390576c4bd
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 15:41:57 2018 +0200

    Code format

commit 8abb56e1dd4b71df2b05bb34bef0530567e4ff2e
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 15:41:40 2018 +0200

    Improve performance

    Thanks to that we don't need RTTI

commit 1feacbb1f9ae6a5ac2209a6dc1df5c868ead8fd4
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 15:14:16 2018 +0200

    Remove trash

commit b5dc5c05589b969dd61eb65b68e4cdce69c5a5fb
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 15:00:15 2018 +0200

    Fix include path

commit 9939fd09805191f0bdada6cb85193a291d519116
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 14:51:02 2018 +0200

    Update install lib

commit 9eaa09f9ec5a29045b03ffc7632878863a2b2b9b
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 14:50:47 2018 +0200

    Fix

commit 7a5b3323af0b728f7e511ac22ff5027c6d06402e
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 14:16:12 2018 +0200

    Update README

commit beb6599ee4385fdffc747dc866db46e160be1358
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 14:16:05 2018 +0200

    Add performance compare to Poco::NotifactionCenter

commit 1d25b997580a9ee09c9db86135b4ca9e1b1a10c6
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 14:14:08 2018 +0200

    Update clang-format

commit 4f4cb4a7e8a849c067a42085eb3e76c3df894bc7
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 13:04:30 2018 +0200

    Remove bad flag

    It is only working for GCC

commit 66a7945084607f94d9d0c803008398e8d281fd06
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 13:03:15 2018 +0200

    Remove deprecated stuff

    It was breaking encapsulation

commit 1e7500607b42bff3632250f623888b95a503dfd0
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 13:01:37 2018 +0200

    Update sample

commit 11a146bb9145fa55f9b9a39a9e033387007a7151
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 13:01:27 2018 +0200

    Add clang-format rules

commit 685562c632d9751f50a2f05b92ef9ebf53a5d6e0
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 12:47:10 2018 +0200

    Reorganize project layout

    Inspired by: https://www.youtube.com/watch?v=6sWec7b0JIc

commit 40d1d6487814730533d7dd7cbedbaf2b4e34ef19
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 12:45:55 2018 +0200

    Remove Catch2 submodule

    Switch to own dependency

commit ca21df04f392adcb027a5b4f25ffac085b51f48c
Author: Dawid Drozd <dawid.drozd@mobica.com>
Date:   Tue Jul 24 11:28:51 2018 +0200

    Remove old code
2018-07-31 11:33:35 +02:00
Dawid Drozd
7ae52d926d Update README 2018-07-02 13:26:13 +02:00
Dawid Drozd
a52ca493cb
Merge pull request #1 from gelldur/windows
Fix Windows compilation error
2018-07-02 13:10:23 +02:00
Pierre Salmon
1e4858e9bc Fix Windows compilation error 2018-02-14 11:34:42 +01:00
Dawid Drozd
caec657b07 Fix GCC compile 2017-12-07 12:07:24 +01:00
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
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
4d43ff4483 Add deprecated for BusAttorney 2017-12-04 13:24:44 +01:00
Dawid Drozd
dc672b48ab Fix typo 2017-11-24 13:29:34 +01:00
Dawid Drozd
6660828175 Bump version to 2.2.0
Break back compatibility of EventCollector::getBus
v2.2.0
2017-11-24 12:55:33 +01:00
Dawid Drozd
2a360f4576 Fix running tests for Travis 2017-11-24 12:54:33 +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
951d3f1e42 Enable testing by variable 2017-11-24 12:40:16 +01:00
Dawid Drozd
5c8da7fe1c Bump version to 2.1.4 v2.1.4 2017-09-20 20:42:21 +02:00
Dawid Drozd
155c93ccd1 Update README with sample usage 2017-09-20 20:42:01 +02:00
Dawid Drozd
f3bcba75fe Add sample project 2017-09-20 19:54:02 +02:00
Dawid Drozd
4064cec28b Remove compile options from library
In some cases using flag:`D_GLIBCXX_DEBUG` will cause some memory corruption
errors. For example our executable will link to this library without
`D_GLIBCXX_DEBUG` flag on it self.

Do not investigate it deeply but probably hardcoding compile options in library
isn't good idea.
2017-09-20 19:50:33 +02:00
Dawid Drozd
6333823bcf Fix format 2017-09-20 19:45:08 +02:00