mucbuc / circuit (public) (License: GPLv3) (since 2020-06-28) (hash sha1)
Synchronize container operations for single objects
List of commits:
Subject Hash Author Date (UTC)
add test, cleanup a2645a9707599ac662125ff644b5d4dd89881ba5 Ubuntu 2020-02-17 13:32:12
swap test e919a4a6aefa351b25c25855c455979f20fc2dab Ubuntu 2020-02-17 13:18:12
cleanup 35969d987323b1960b0c39e9f7236fb45ae3ca59 Ubuntu 2020-02-17 13:10:52
rm factory b19fc2ec7f36c80863135390b16b8ec61171c4e3 Ubuntu 2020-02-17 13:07:30
fix compile error f5b444d7d69d767bad920bb87c160d7343f8a0ac mucbuc 2020-02-17 00:48:56
readme fedc4d45a3e272e41530f8b69e8723458d701cd1 mucbuc 2020-02-02 18:31:04
fix example 2fc197494263598841ea301fbac5a3a088d47ab1 mucbuc 2020-02-02 05:47:12
README.md caa2c0c6d55d266c560c32a6f06d74700d9dd10d mucbuc 2020-02-02 04:44:22
fix duped entries 2afd4d8742f93c8146c32950b617e18d4a994c3c mucbuc 2020-02-02 02:37:16
generated doc d568f07b6e4d2171c7e50dd0a8d23a809f30d567 mucbuc 2020-02-02 02:35:34
clone method 8ed894a629b78d61421f1b707564756fb0bb4f90 mucbuc 2020-01-25 20:01:53
siplify example d3f446eed13921445fd6f16f345e50e873a245e8 mucbuc 2020-01-24 14:44:36
Edited README.md c4daca7870daa3a2bcc3cb3a56353b075feeea83 mark 2020-01-21 05:25:32
Edited README.md dd5ec0c9fb495adc91a3446c6029e10cbca50741 mark 2020-01-21 05:23:48
Edited README.md 7b965f28e6800858cb7250e4a838a11d99aa9146 mark 2020-01-21 05:22:23
README.md b04ce36a75a1cc03f592f498320bcbd2487391e3 Ubuntu 2020-01-21 05:17:29
stack example 10c89c204a6c7173da4cab531b023e49b43b282f Ubuntu 2020-01-21 05:10:05
rename namespace 58de02fbcccc180ddbd895c03fe7615d85079fc2 mucbuc 2020-01-19 12:06:11
cleanup 5ffc59ee2057db41384465ada3ce02da94928d83 mucbuc 2020-01-19 11:48:09
fixed swap e79678e9a0f6c401bf6c75c073b4afb1d9c99239 mucbuc 2020-01-16 12:33:51
Commit a2645a9707599ac662125ff644b5d4dd89881ba5 - add test, cleanup
Author: Ubuntu
Author date (UTC): 2020-02-17 13:32
Committer name: Ubuntu
Committer date (UTC): 2020-02-17 13:32
Parent(s): e919a4a6aefa351b25c25855c455979f20fc2dab
Signing key:
Tree: 556f925385b3f60d6fbe29ddc75b158543854c45
File Lines added Lines deleted
README.md 2 0
src/impl/queue.h 0 6
src/impl/stack.h 0 6
src/index.h 11 0
src/interface.h 2 0
test/src/example.cpp 5 5
test/src/main.cpp 5 4
File README.md changed (mode: 100644) (index fa946d4..c660f64)
... ... Syncronize container operations for single objects
6 6 ``` ```
7 7 #pragma once #pragma once
8 8
9 #include <memory>
10
9 11 namespace om636 { namespace om636 {
10 12 namespace circuit { namespace circuit {
11 13
File src/impl/queue.h changed (mode: 100644) (index ff99ae5..b4aaa20)
... ... namespace circuit {
59 59 std::queue<value_type> m_queue; std::queue<value_type> m_queue;
60 60 }; };
61 61
62 template <typename T>
63 std::shared_ptr<Circuit<T>> make_queue()
64 {
65 return std::make_shared<CircuitHost<T, QueuePolicy>>();
66 }
67
68 62 } // circuit } // circuit
69 63 } // om636 } // om636
File src/impl/stack.h changed (mode: 100644) (index 70712b5..20c2f4c)
... ... namespace circuit {
59 59 std::stack<value_type> m_stack; std::stack<value_type> m_stack;
60 60 }; };
61 61
62 template <typename T>
63 std::shared_ptr<Circuit<T>> make_stack()
64 {
65 return std::make_shared<CircuitHost<T, StackPolicy>>();
66 }
67
68 62 } // circuit } // circuit
69 63 } // om636 } // om636
File src/index.h changed (mode: 100644) (index aac2bba..28fc6fd)
... ... namespace circuit {
13 13 template <typename T> template <typename T>
14 14 using CircuitQueue = CircuitHost<T, QueuePolicy>; using CircuitQueue = CircuitHost<T, QueuePolicy>;
15 15
16 template <typename T>
17 std::shared_ptr<Circuit<T>> make_stack()
18 {
19 return std::make_shared<CircuitStack<T>>();
20 }
21
22 template <typename T>
23 std::shared_ptr<Circuit<T>> make_queue()
24 {
25 return std::make_shared<CircuitQueue<T>>();
26 }
16 27 } // circuit } // circuit
17 28 } // om636 } // om636
File src/interface.h changed (mode: 100644) (index 4cf867e..e1c653a)
1 1 #pragma once #pragma once
2 2
3 #include <memory>
4
3 5 namespace om636 { namespace om636 {
4 6 namespace circuit { namespace circuit {
5 7
File test/src/example.cpp changed (mode: 100644) (index 52afea0..2fb5719)
... ... using namespace om636::circuit;
7 7
8 8 int main() int main()
9 9 { {
10 CircuitStack<int> s;
10 auto s = make_stack<int>();
11 11
12 s.push(88);
13 s.push(77);
12 s->push(88);
13 s->push(77);
14 14
15 s.wait_pop(i);
16 if (s.check_pop(i)) {
15 s->wait_pop(i);
16 if (s->check_pop(i)) {
17 17 } }
18 18 } }
File test/src/main.cpp changed (mode: 100644) (index 7eafe62..44136a0)
... ... void test_wait_pop(T s)
18 18 tmp.join(); tmp.join();
19 19 } }
20 20
21 template<class T>
22 void test_ctor_and_swap() {
23 T a, b;
24 a.swap(b);
21 template <class T>
22 void test_ctor_and_swap()
23 {
24 T a, b;
25 a.swap(b);
25 26 } }
26 27
27 28 int main() int main()
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/circuit

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

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

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