List of commits:
Subject Hash Author Date (UTC)
fix build error 51fcd8e612a8e89cf6ef2c94cfb82b664b532313 mucbuc 2019-11-29 06:49:34
moved impl back e536719eb2c090e49e1f389deed19dbdcd582275 mucbuc 2019-11-27 15:17:35
emitter_impl 4d41cb0eb6ee37a66b9c8d3b02824ec2020bca31 mucbuc 2019-11-26 10:58:35
using template parameter packs b01b5f9568215ccfd5c7c30cfb68ccc8a3c720da mucbuc 2019-11-14 14:21:50
cleanup 0403bb7332d11797467282d58735cefb518e8407 mucbuc 2019-11-12 05:13:03
rm emitter 55ae1aa2ce377d75e47d18a2ed29b44b7e24f93f mucbuc 2019-11-12 04:49:21
once while emit recursive 172a4d72599206575d18b2055e5a0231646d9274 mucbuc 2019-11-12 04:44:22
once_wile_emit 785a96521c22785401b9408a54a4ffb5c1541fa1 mucbuc 2019-11-12 04:37:40
on_while_emit 40ce61bbb69d5557944c3055d7fca492acf86e70 mucbuc 2019-11-11 15:21:30
modify while traverse ed70186f19dea7c92a9b98c0df7aec4973a37b98 mucbuc 2019-11-11 15:10:58
on test b8fc778d7056fb108fbdd7318f294e2b340faeeb mucbuc 2019-11-11 15:01:22
emit with args a40831a0902f0dfa35d8f5e314b1e5b21955eae7 mucbuc 2019-11-11 14:40:46
emit with arg 2cfab1f1668896ac6d58e868b8ee6d41a79dc447 mucbuc 2019-11-11 02:45:45
check dispatch logic 5b40033514e610292c25336b821829675c8f7edd mucbuc 2019-11-11 02:35:18
another test 718946ff7621bab0d8242e19ab423626c41a0b97 mucbuc 2019-11-11 02:20:42
emit once d3d244834caec7f581b254957c22b8f1c2af5321 mucbuc 2019-11-11 00:31:05
brreaking apart tests 0fa426d441993960bb8752d646744c748f2767f4 mucbuc 2019-11-11 00:13:05
trimmed 765e78aeba5eab8cd4ab933792327b393322c56a mucbuc 2019-11-10 22:39:52
fix convcurent test 11773096bd273e10835aa534f8f45ed2f25b2af6 mucbuc 2019-11-09 20:10:17
break appat e70933ddd90fcc006e0456cb60b096144e17b8bf mucbuc 2019-11-09 19:52:07
Commit 51fcd8e612a8e89cf6ef2c94cfb82b664b532313 - fix build error
Author: mucbuc
Author date (UTC): 2019-11-29 06:49
Committer name: mucbuc
Committer date (UTC): 2019-11-29 06:49
Parent(s): e536719eb2c090e49e1f389deed19dbdcd582275
Signer:
Signing key:
Signing status: N
Tree: ef05c4394553450520da455c59c8d75644efffbe
File Lines added Lines deleted
TODO.txt 2 1
src/emitter_impl.h 8 2
src/emitter_impl.hxx 1 1
src/interface.h 2 2
test/src/emit_with_arg.cpp 3 3
File TODO.txt changed (mode: 100644) (index fea1eb7..22a9c2d)
1 Implementation plan:
1 Implementation plan:
2 X( restore member variales in emitter_impl
2 3 1) define abstract interface 1) define abstract interface
3 4 2) inherit from it 2) inherit from it
4 5 3) add factory methdo 3) add factory methdo
File src/emitter_impl.h changed (mode: 100644) (index ae8853e..189deba)
5 5 #include <memory> #include <memory>
6 6 #include <set> #include <set>
7 7
8 #include "emitter.h"
8 #include "interface.h"
9 9
10 10 namespace om636 { namespace om636 {
11 11 namespace control { namespace control {
12 12 template <typename T, typename ... U> template <typename T, typename ... U>
13 class EmitterImpl : Emitter<T, ...U>
13 class EmitterImpl : Emitter<T, U ...>
14 14 { {
15 15 public: public:
16 16 typedef T event_type; typedef T event_type;
 
... ... namespace control {
25 25 void removeAllListeners(); void removeAllListeners();
26 26
27 27 void interupt(event_type, U ...); void interupt(event_type, U ...);
28 private:
29 typedef std::map<event_type, batch_type> map_type;
30 void kill_all(map_type&);
31
32 map_type m_repeat;
33 map_type m_once;
28 34 }; };
29 35 } //control } //control
30 36 } // om636 } // om636
File src/emitter_impl.hxx changed (mode: 100644) (index 7aad951..50dae9f)
... ... namespace control {
33 33
34 34 ///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
35 35 template <typename T, typename ... U> template <typename T, typename ... U>
36 void EmitterImpl<T, U ...>::interrupt(event_type e, U ... arg)
36 void EmitterImpl<T, U ...>::interupt(event_type e, U ... arg)
37 37 { {
38 38 m_once[e].merge_added_elements(); m_once[e].merge_added_elements();
39 39 m_repeat[e].merge_added_elements(); m_repeat[e].merge_added_elements();
File src/interface.h changed (mode: 100644) (index c2ec613..f1e3675)
... ... namespace control {
31 31
32 32 template <typename T, typename ... U> template <typename T, typename ... U>
33 33 class Quemitter class Quemitter
34 : public Emitter<T, U> {
34 : public Emitter<T, U ...> {
35 35
36 typedef Emitter<T, U> base_type;
36 typedef Emitter<T, U ... > base_type;
37 37
38 38 public: public:
39 39 using typename base_type::event_type; using typename base_type::event_type;
File test/src/emit_with_arg.cpp changed (mode: 100644) (index 5af1a01..31fda9c)
2 2 #include <iostream> #include <iostream>
3 3 #include <vector> #include <vector>
4 4 #include <tmp/src/test.h> #include <tmp/src/test.h>
5 #include <lib/ohm/src/emitter.h>
5 #include <lib/ohm/src/emitter_impl.h>
6 6
7 7 using namespace std; using namespace std;
8 8 using namespace om636; using namespace om636;
 
... ... void check_emit_with_arg()
27 27 ++test_passed; ++test_passed;
28 28 })); }));
29 29
30 e.emit(event, 99);
30 e.interupt(event, 99);
31 31
32 32 ASSERT(test_passed == 2); ASSERT(test_passed == 2);
33 33
 
... ... int main()
41 41 { {
42 42 using namespace std; using namespace std;
43 43
44 check_emit_with_arg<om636::control::Emitter>();
44 check_emit_with_arg<om636::control::EmitterImpl>();
45 45 //check_emit_with_arg<QueuedEmitter>(); //check_emit_with_arg<QueuedEmitter>();
46 46
47 47 return 0; return 0;
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mucbuc/ohm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mucbuc/ohm

Clone this repository using git:
git clone git://git.rocketgit.com/user/mucbuc/ohm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main