/README.md (d600bbb06813e543a8272c484204d2e48786b32f) (1629 bytes) (mode 100644) (type blob)
## Objective
Syncronize container operations (for single objects)
## Interface
```
namespace om636 {
namespace circuit {
template <class T>
struct Circuit {
typedef T value_type;
virtual ~Circuit() = default;
virtual void push(value_type&&) = 0;
virtual bool check_pop(value_type&) = 0;
virtual void wait_pop(value_type&) = 0;
};
} // circuit
} // om636
```
## Example
```
#include <tmp/src/test.h>
#include <lib/circuit/src/index.h>
using namespace std;
using namespace om636::circuit;
int main()
{
CircuitStack<int> s;
s.push(88);
s.push(77);
s.wait_pop(i);
if (s.check_pop(i)) {
}
}
```
##### output
```
popped: 99
popped: 77
popped: 88
```
> circuit@1.0.0 generateDoc /home/mark/work/circuit
> doc-tool package_header src_interface ./EXAMPLE.md
#circuit
Syncronize container operations for single objects
# Interface
```
#pragma once
namespace om636 {
namespace circuit {
template <class T>
struct Circuit {
typedef T value_type;
virtual ~Circuit() = default;
virtual void push(value_type&&) = 0;
virtual bool check_pop(value_type&) = 0;
virtual void wait_pop(value_type&) = 0;
virtual Circuit* clone() const = 0;
};
} // circuit
} // om636
```
## Example
```
#include <tmp/src/test.h>
#include <lib/circuit/src/index.h>
using namespace std;
using namespace om636::circuit;
int main()
{
CircuitStack<int> s;
s.push(88);
s.push(77);
s.wait_pop(i);
if (s.check_pop(i)) {
}
}
```
##### output
```
popped: 77
popped: 88
```
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
42 |
9b920a41f28c9a32e8d7b31f4532aedd0e5bbf63 |
.gitignore |
100644 |
blob |
408 |
0799fadcd382da98390296e6877f1cbf15fa4469 |
EXAMPLE.md |
100644 |
blob |
1629 |
d600bbb06813e543a8272c484204d2e48786b32f |
README.md |
100644 |
blob |
185 |
cf28781387486366671abe36c5b1a99049128cd2 |
circuit.json |
100644 |
blob |
448 |
855be082cd92f207bc0a0fc239e72bdc00313af8 |
package.json |
040000 |
tree |
- |
7f9d7ddb216799de0a2b48d828fb334e3769e8d6 |
src |
040000 |
tree |
- |
e74793687f1c5806bc8a004179c242c54076f7c7 |
test |
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