List of commits:
Subject Hash Author Date (UTC)
dummy policy 65fae3bca8ed23be81bd75e271e85030a48d1ccb mucbuc 2020-02-16 17:29:07
cleanup 2e46ef599e15758ba6c5f071be163cb870cb6547 mucbuc 2020-02-16 16:32:19
rename elemements to impl_ref 7bf7fbda736a73f86fa460194873cceadca51009 mucbuc 2020-02-16 13:49:38
example doc a65ae924d3426c7de7cb4f3c8e29c8180acf6fde mucbuc 2020-02-13 14:40:59
format source 0288bc49240445da1dd0013feb6e2d157d8a5cea mucbuc 2020-02-13 14:35:16
example builds 701303d8c13b423195f3f0e43c8e5d26af5360c8 mucbuc 2020-02-13 14:33:01
circuit update 6b334746c8f61dbeb8707a9045b83d01ce7259de mucbuc 2020-02-12 13:36:57
interface 8aaad13bc18270477139d6144771cebdba2928d6 mucbuc 2020-01-23 05:38:16
hook_once e800fa98f37b99f456e0f474d2a95eac87dbe020 mucbuc 2020-01-20 17:22:05
twice_size => circuit 07e34c75c67aa4ccaed56d26357bb29f75914005 mucbuc 2020-01-20 12:09:43
reset agent and check before callback 9ce516c3b921eb0e853b17119a4960fdf3936dcf mucbuc 2020-01-19 06:57:31
include statement 2c33dfbb947f7aafd05413b78dea3a0c036cf91b mucbuc 2020-01-17 10:29:01
formating 99ddddbf993037c4bdc573c149b28db242ac0862 mucbuc 2020-01-17 05:30:56
invoke_once b6ee37d690063e31b0300fdef0319d26293f0532 mucbuc 2020-01-17 05:29:52
remove agent 31359a9da855067033433f4310d172dadc813f28 mucbuc 2020-01-16 12:55:13
formati 13721c73e8d359eab3f32a030a35a42b83a341f0 mucbuc 2020-01-16 12:40:00
fix tests 343e081bf929c31592f835b279e5e4cd2c149539 mucbuc 2020-01-16 12:37:58
strip interface 991fc85aa55fc6f1d08fe94673840c14f2087ea8 mucbuc 2020-01-16 05:44:55
*break* circuit poc 26840f5e3ecca09bc113cb42fff5275c9213e0ae mucbuc 2020-01-14 11:32:23
add circuit 0cc2be277c7c0bdd4026e056292cc2d6f4150195 mucbuc 2020-01-14 11:30:23
Commit 65fae3bca8ed23be81bd75e271e85030a48d1ccb - dummy policy
Author: mucbuc
Author date (UTC): 2020-02-16 17:29
Committer name: mucbuc
Committer date (UTC): 2020-02-16 17:29
Parent(s): 2e46ef599e15758ba6c5f071be163cb870cb6547
Signing key:
Tree: fa824f45a7b24824c757f97872f6715414e55823
File Lines added Lines deleted
src/factory.h 2 3
src/impl/batch.h 7 1
src/impl/batch.hxx 10 10
test/src/batch.h 7 7
File src/factory.h changed (mode: 100644) (index fd13097..a1a090b)
5 5 namespace om636 { namespace om636 {
6 6
7 7 namespace control { namespace control {
8
9 8 template <typename... T> template <typename... T>
10 std::shared_ptr<BatchImpl<T...>> make_batch()
9 std::shared_ptr<BatchImpl<dummy, T...>> make_batch()
11 10 { {
12 return std::make_shared<BatchImpl<T...>>();
11 return std::make_shared<BatchImpl<dummy, T...>>();
13 12 } }
14 13
15 14 } }
File src/impl/batch.h changed (mode: 100644) (index 45643a7..887da68)
10 10
11 11 namespace om636 { namespace om636 {
12 12 namespace control { namespace control {
13 template <typename... T>
13
14 template<class T>
15 class dummy
16 {};
17
18
19 template <template<typename> typename P, typename... T>
14 20 class BatchImpl : public Batch<T...> { class BatchImpl : public Batch<T...> {
15 21 public: public:
16 22 typedef Batch<T...> base_type; typedef Batch<T...> base_type;
File src/impl/batch.hxx changed (mode: 100644) (index e261b80..edeaf02)
1 1 namespace om636 { namespace om636 {
2 2 namespace control { namespace control {
3 3 ///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
4 template <typename... T>
5 auto BatchImpl<T...>::hook(function_type callback) -> agent_type
4 template <template<typename> typename P, typename... T>
5 auto BatchImpl<P, T...>::hook(function_type callback) -> agent_type
6 6 { {
7 7 using namespace std; using namespace std;
8 8 auto agent(make_shared<function_type>(callback)); auto agent(make_shared<function_type>(callback));
 
... ... namespace control {
11 11 } }
12 12
13 13 ///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
14 template <typename... T>
15 auto BatchImpl<T...>::hook_once(function_type callback) -> agent_type
14 template <template<typename> typename P, typename... T>
15 auto BatchImpl<P, T...>::hook_once(function_type callback) -> agent_type
16 16 { {
17 17 using namespace std; using namespace std;
18 18 auto agent(make_shared<function_type>(callback)); auto agent(make_shared<function_type>(callback));
 
... ... namespace control {
21 21 } }
22 22
23 23 ///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
24 template <typename... T>
25 void BatchImpl<T...>::invoke(T... arg)
24 template <template<typename> typename P, typename... T>
25 void BatchImpl<P, T...>::invoke(T... arg)
26 26 { {
27 27 using namespace std; using namespace std;
28 28 batch_type traverse; batch_type traverse;
 
... ... namespace control {
41 41 } }
42 42
43 43 ///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
44 template <typename... T>
45 auto BatchImpl<T...>::impl_ref() -> batch_type&
44 template <template<typename> typename P, typename... T>
45 auto BatchImpl<P, T...>::impl_ref() -> batch_type&
46 46 { {
47 47 return m_impl; return m_impl;
48 48 } }
49 49
50 50 ///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
51 template <typename... T>
52 auto BatchImpl<T...>::impl_ref() const -> const batch_type&
51 template <template<typename> typename P, typename... T>
52 auto BatchImpl<P, T...>::impl_ref() const -> const batch_type&
53 53 { {
54 54 return m_impl; return m_impl;
55 55 } }
File test/src/batch.h changed (mode: 100644) (index 0c576c2..f5ac19c)
... ... using namespace std;
4 4
5 5 void check_unhook_while_traverse() void check_unhook_while_traverse()
6 6 { {
7 BatchImpl<> batch;
7 BatchImpl<dummy> batch;
8 8 unsigned passed(0); unsigned passed(0);
9 9
10 typename BatchImpl<>::listener_type temp(batch.hook([&]() {
10 typename BatchImpl<dummy>::listener_type temp(batch.hook([&]() {
11 11 ++passed; ++passed;
12 12 temp.reset(); temp.reset();
13 13 })); }));
 
... ... void check_unhook_while_traverse()
21 21
22 22 void dead_agent_removal() void dead_agent_removal()
23 23 { {
24 typedef BatchImpl<int> batch_type;
24 typedef BatchImpl<dummy, int> batch_type;
25 25 batch_type batch; batch_type batch;
26 26 batch.hook([](int) {}); batch.hook([](int) {});
27 27 batch.invoke(9); batch.invoke(9);
 
... ... void dead_agent_removal()
31 31
32 32 void check_traverse_with_arg() void check_traverse_with_arg()
33 33 { {
34 BatchImpl<int> batch;
34 BatchImpl<dummy, int> batch;
35 35 int v = 0; int v = 0;
36 36 auto p(batch.hook([&](int i) { auto p(batch.hook([&](int i) {
37 37 v = i; v = i;
 
... ... void check_traverse_with_arg()
44 44
45 45 void check_traverse_with_args() void check_traverse_with_args()
46 46 { {
47 typedef BatchImpl<int, int> batch_type;
47 typedef BatchImpl<dummy, int, int> batch_type;
48 48
49 49 unsigned test_passed(0); unsigned test_passed(0);
50 50 batch_type batch; batch_type batch;
 
... ... void check_traverse_with_args()
62 62
63 63 void check_traverse_while_traverse() void check_traverse_while_traverse()
64 64 { {
65 BatchImpl<> batch;
65 BatchImpl<dummy> batch;
66 66 unsigned passed(0); unsigned passed(0);
67 67
68 68 auto p(batch.hook([&]() { auto p(batch.hook([&]() {
 
... ... void check_traverse_while_traverse()
77 77
78 78 void check_traverse() void check_traverse()
79 79 { {
80 BatchImpl<> batch;
80 BatchImpl<dummy> batch;
81 81 unsigned passed(0); unsigned passed(0);
82 82
83 83 auto temp(batch.hook([&]() { auto temp(batch.hook([&]() {
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/dynamo

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

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

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