List of commits:
Subject Hash Author Date (UTC)
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
formating d0c058639d2aec3f3e8f94da64e03e316d1c0914 mucbuc 2020-01-14 11:04:33
documentation f9e40f305cb18e274187ca4a6d5337d074d1ff30 mucbuc 2020-01-12 15:38:09
Commit 7bf7fbda736a73f86fa460194873cceadca51009 - rename elemements to impl_ref
Author: mucbuc
Author date (UTC): 2020-02-16 13:49
Committer name: mucbuc
Committer date (UTC): 2020-02-16 13:49
Parent(s): a65ae924d3426c7de7cb4f3c8e29c8180acf6fde
Signing key:
Tree: 6764231db72afa0f0cb5bb23ad74d6676cc0e7f2
File Lines added Lines deleted
src/impl/batch.h 3 3
src/impl/batch.hxx 8 8
test/src/batch.h 1 1
File src/impl/batch.h changed (mode: 100644) (index 986d903..45643a7)
... ... namespace control {
25 25 typedef std::weak_ptr<typename agent_type::element_type> pointer_type; typedef std::weak_ptr<typename agent_type::element_type> pointer_type;
26 26 typedef std::tuple<pointer_type, bool> tuple_type; typedef std::tuple<pointer_type, bool> tuple_type;
27 27 typedef circuit::CircuitQueue<tuple_type> batch_type; typedef circuit::CircuitQueue<tuple_type> batch_type;
28 batch_type& elements();
29 const batch_type& elements() const;
28 batch_type& impl_ref();
29 const batch_type& impl_ref() const;
30 30
31 31 private: private:
32 32 template <typename U> template <typename U>
33 33 void invoke(U, T...); void invoke(U, T...);
34 34
35 batch_type m_elements;
35 batch_type m_impl;
36 36 }; };
37 37
38 38 } //control } //control
File src/impl/batch.hxx changed (mode: 100644) (index 39bd122..ba4b49c)
... ... namespace control {
5 5 auto BatchImpl<T...>::hook(function_type callback) -> agent_type auto BatchImpl<T...>::hook(function_type callback) -> agent_type
6 6 { {
7 7 auto agent(std::make_shared<function_type>(callback)); auto agent(std::make_shared<function_type>(callback));
8 m_elements.push(std::make_tuple<pointer_type, bool>(agent, true));
8 impl_ref().push(std::make_tuple<pointer_type, bool>(agent, true));
9 9 return agent; return agent;
10 10 } }
11 11
 
... ... namespace control {
14 14 auto BatchImpl<T...>::hook_once(function_type callback) -> agent_type auto BatchImpl<T...>::hook_once(function_type callback) -> agent_type
15 15 { {
16 16 auto agent(std::make_shared<function_type>(callback)); auto agent(std::make_shared<function_type>(callback));
17 m_elements.push(std::make_tuple<pointer_type, bool>(agent, false));
17 impl_ref().push(std::make_tuple<pointer_type, bool>(agent, false));
18 18 return agent; return agent;
19 19 } }
20 20
 
... ... namespace control {
23 23 void BatchImpl<T...>::invoke(T... arg) void BatchImpl<T...>::invoke(T... arg)
24 24 { {
25 25 batch_type traverse; batch_type traverse;
26 traverse.swap(elements());
26 traverse.swap(impl_ref());
27 27 tuple_type agent; tuple_type agent;
28 28 while (traverse.check_pop(agent)) { while (traverse.check_pop(agent)) {
29 29 agent_type s(std::get<0>(agent).lock()); agent_type s(std::get<0>(agent).lock());
 
... ... namespace control {
32 32 } }
33 33 s = std::get<0>(agent).lock(); s = std::get<0>(agent).lock();
34 34 if (s && std::get<1>(agent)) { if (s && std::get<1>(agent)) {
35 elements().push(std::move(agent));
35 impl_ref().push(std::move(agent));
36 36 } }
37 37 } }
38 38 } }
39 39
40 40 ///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
41 41 template <typename... T> template <typename... T>
42 auto BatchImpl<T...>::elements() -> batch_type&
42 auto BatchImpl<T...>::impl_ref() -> batch_type&
43 43 { {
44 return m_elements;
44 return m_impl;
45 45 } }
46 46
47 47 ///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
48 48 template <typename... T> template <typename... T>
49 auto BatchImpl<T...>::elements() const -> const batch_type&
49 auto BatchImpl<T...>::impl_ref() const -> const batch_type&
50 50 { {
51 return m_elements;
51 return m_impl;
52 52 } }
53 53 } // control } // control
54 54 } // om636 } // om636
File test/src/batch.h changed (mode: 100644) (index 4097e88..0c576c2)
... ... void dead_agent_removal()
26 26 batch.hook([](int) {}); batch.hook([](int) {});
27 27 batch.invoke(9); batch.invoke(9);
28 28
29 ASSERT(batch.elements().empty() && "dead agent removal");
29 ASSERT(batch.impl_ref().empty() && "dead agent removal");
30 30 } }
31 31
32 32 void check_traverse_with_arg() void check_traverse_with_arg()
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