Skip to content

Commit

Permalink
Removed mentions of group from the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kgorking committed Nov 22, 2023
1 parent 6ae5f99 commit da53e73
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ import ecs;
- [Traversal and layout](#Traversal-and-layout)
- [System options](#system-options)
- [`opts::interval<ms, us>`](#optsintervalms-us)[<img src="https://godbolt.org/favicon.ico" width="16">](https://godbolt.org/z/aGM86KWdf)
- [`opts::group<group number>`](#optsgroupgroup-number)[<img src="https://godbolt.org/favicon.ico" width="16">](https://godbolt.org/z/ezoq17fbr)
- [`opts::manual_update`](#optsmanual_update)[<img src="https://godbolt.org/favicon.ico" width="16">](https://godbolt.org/z/TxvndcTEq)
- [`opts::not_parallel`](#optsnot_parallel)[<img src="https://godbolt.org/favicon.ico" width="16">](https://godbolt.org/z/MK9xcTedq)
- [Variant components](#variant-components)
Expand Down Expand Up @@ -344,32 +343,6 @@ rt.make_system<ecs::opts::interval<16, 667>>([](int const&) {
```


### `opts::group<N>`[<img src="https://godbolt.org/favicon.ico" width="32">](https://godbolt.org/z/ezoq17fbr)
Systems can be segmented into groups by passing along `opts::group<N>`, where `N` is a compile-time integer constant, as a template parameter to `ecs::make_system`. Systems are roughly executed in the order they are made, but groups ensure absolute separation of systems. Systems with no group id specified are put into the default group 0.

```cpp
rt.make_system<ecs::opts::group<1>>([](int const&) {
std::cout << "hello from group one\n";
});
rt.make_system<ecs::opts::group<-1>>([](int const&) {
std::cout << "hello from group negative one\n";
});
rt.make_system([](int const&) { // same as 'ecs::opts::group<0>'
std::cout << "hello from group whatever\n";
});
// ...
rt.add_component(0, int{});
rt.update();
```

Running the above code will print out
> hello from group negative one\
> hello from group whatever\
> hello from group one
**Note:** systems from different groups are never executed concurrently, and all systems in one group will run to completion before the next group is run.


### `opts::manual_update`[<img src="https://godbolt.org/favicon.ico" width="32">](https://godbolt.org/z/TxvndcTEq)
Systems marked as being manually updated will not be added to the scheduler, and will thus require the user to call the `system::run()` function themselves.
Calls to `ecs::runtime::commit_changes()` will still cause the system to respond to changes in components.
Expand Down

0 comments on commit da53e73

Please sign in to comment.