Skip to content

Instantly share code, notes, and snippets.

@luser
Created August 12, 2020 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luser/cac2e488be11c8bda12eb9d566acbfe2 to your computer and use it in GitHub Desktop.
Save luser/cac2e488be11c8bda12eb9d566acbfe2 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
#![feature(prelude_import)]
#[prelude_import]
use std::prelude::v1::*;
#[macro_use]
extern crate std;
pub use bevy_hecs::{Query as HecsQuery, *};
mod resource {
mod resource_query {
use super::{FromResources, Resources};
use crate::{system::{SystemId, TypeAccess}, Resource, ResourceIndex};
use core::{any::TypeId, ops::{Deref, DerefMut}, ptr::NonNull};
use bevy_hecs::smaller_tuples_too;
use std::marker::PhantomData;
/// Shared borrow of a Resource
pub struct Res<'a, T: Resource> {
value: &'a T,
}
impl <'a, T: Resource> Res<'a, T> {
pub unsafe fn new(value: NonNull<T>) -> Self {
Self{value: &*value.as_ptr(),}
}
}
/// A clone that is unsafe to perform. You probably shouldn't use this.
pub trait UnsafeClone {
unsafe fn unsafe_clone(&self)
-> Self;
}
impl <'a, T: Resource> UnsafeClone for Res<'a, T> {
unsafe fn unsafe_clone(&self) -> Self { Self{value: self.value,} }
}
unsafe impl <T: Resource> Send for Res<'_, T> { }
unsafe impl <T: Resource> Sync for Res<'_, T> { }
impl <'a, T: Resource> Deref for Res<'a, T> {
type Target = T;
fn deref(&self) -> &T { self.value }
}
/// Unique borrow of a Resource
pub struct ResMut<'a, T: Resource> {
_marker: PhantomData<&'a T>,
value: *mut T,
}
impl <'a, T: Resource> ResMut<'a, T> {
pub unsafe fn new(value: NonNull<T>) -> Self {
Self{value: value.as_ptr(), _marker: Default::default(),}
}
}
unsafe impl <T: Resource> Send for ResMut<'_, T> { }
unsafe impl <T: Resource> Sync for ResMut<'_, T> { }
impl <'a, T: Resource> Deref for ResMut<'a, T> {
type Target = T;
fn deref(&self) -> &T { unsafe { &*self.value } }
}
impl <'a, T: Resource> DerefMut for ResMut<'a, T> {
fn deref_mut(&mut self) -> &mut T { unsafe { &mut *self.value } }
}
impl <'a, T: Resource> UnsafeClone for ResMut<'a, T> {
unsafe fn unsafe_clone(&self) -> Self {
Self{value: self.value, _marker: Default::default(),}
}
}
/// Local<T> resources are unique per-system. Two instances of the same system will each have their own resource.
/// Local resources are automatically initialized using the FromResources trait.
pub struct Local<'a, T: Resource + FromResources> {
value: *mut T,
_marker: PhantomData<&'a T>,
}
impl <'a, T: Resource + FromResources> UnsafeClone for Local<'a, T> {
unsafe fn unsafe_clone(&self) -> Self {
Self{value: self.value, _marker: Default::default(),}
}
}
impl <'a, T: Resource + FromResources> Deref for Local<'a, T> {
type Target = T;
fn deref(&self) -> &T { unsafe { &*self.value } }
}
impl <'a, T: Resource + FromResources> DerefMut for Local<'a, T> {
fn deref_mut(&mut self) -> &mut T { unsafe { &mut *self.value } }
}
/// A collection of resource types fetch from a `Resources` collection
pub trait ResourceQuery {
type Fetch: for<'a> FetchResource<'a>;
fn initialize(_resources: &mut Resources,
_system_id: Option<SystemId>) {
}
}
/// Streaming iterators over contiguous homogeneous ranges of resources
pub trait FetchResource<'a>: Sized {
/// Type of value to be fetched
type Item: UnsafeClone;
fn access()
-> TypeAccess;
fn borrow(resources: &Resources);
fn release(resources: &Resources);
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>)
-> Self::Item;
}
impl <'a, T: Resource> ResourceQuery for Res<'a, T> {
type Fetch = FetchResourceRead<T>;
}
/// Fetches a shared resource reference
pub struct FetchResourceRead<T>(NonNull<T>);
impl <'a, T: Resource> FetchResource<'a> for FetchResourceRead<T> {
type Item = Res<'a, T>;
unsafe fn get(resources: &'a Resources,
_system_id: Option<SystemId>) -> Self::Item {
Res::new(resources.get_unsafe_ref::<T>(ResourceIndex::Global))
}
fn borrow(resources: &Resources) { resources.borrow::<T>(); }
fn release(resources: &Resources) { resources.release::<T>(); }
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.immutable.insert(TypeId::of::<T>());
access
}
}
impl <'a, T: Resource> ResourceQuery for ResMut<'a, T> {
type Fetch = FetchResourceWrite<T>;
}
/// Fetches a unique resource reference
pub struct FetchResourceWrite<T>(NonNull<T>);
impl <'a, T: Resource> FetchResource<'a> for FetchResourceWrite<T> {
type Item = ResMut<'a, T>;
unsafe fn get(resources: &'a Resources,
_system_id: Option<SystemId>) -> Self::Item {
ResMut::new(resources.get_unsafe_ref::<T>(ResourceIndex::Global))
}
fn borrow(resources: &Resources) { resources.borrow_mut::<T>(); }
fn release(resources: &Resources) {
resources.release_mut::<T>();
}
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.mutable.insert(TypeId::of::<T>());
access
}
}
impl <'a, T: Resource + FromResources> ResourceQuery for Local<'a, T>
{
type Fetch = FetchResourceLocalMut<T>;
fn initialize(resources: &mut Resources, id: Option<SystemId>) {
let value = T::from_resources(resources);
let id =
id.expect("Local<T> resources can only be used by systems");
resources.insert_local(id, value);
}
}
/// Fetches a `Local<T>` resource reference
pub struct FetchResourceLocalMut<T>(NonNull<T>);
impl <'a, T: Resource + FromResources> FetchResource<'a> for
FetchResourceLocalMut<T> {
type Item = Local<'a, T>;
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
let id =
system_id.expect("Local<T> resources can only be used by systems");
Local{value:
resources.get_unsafe_ref::<T>(ResourceIndex::System(id)).as_ptr(),
_marker: Default::default(),}
}
fn borrow(resources: &Resources) { resources.borrow_mut::<T>(); }
fn release(resources: &Resources) {
resources.release_mut::<T>();
}
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.mutable.insert(TypeId::of::<T>());
access
}
}
macro_rules! tuple_impl {
($ ($ name : ident), *) =>
{
impl < 'a, $ ($ name : FetchResource < 'a >), * >
FetchResource < 'a > for($ ($ name,) *)
{
type Item = ($ ($ name :: Item,) *) ; #
[allow(unused_variables)] fn
borrow(resources : & Resources)
{ $ ($ name :: borrow(resources) ;) * } #
[allow(unused_variables)] fn
release(resources : & Resources)
{ $ ($ name :: release(resources) ;) * } #
[allow(unused_variables)] unsafe fn
get(resources : & 'a Resources, system_id : Option <
SystemId >) -> Self :: Item
{ ($ ($ name :: get(resources, system_id),) *) } #
[allow(unused_mut)] fn access() -> TypeAccess
{
let mut access = TypeAccess :: default() ; $
(access . union(& $ name :: access()) ;) * access
}
} impl < $ ($ name : ResourceQuery), * > ResourceQuery
for($ ($ name,) *)
{
type Fetch = ($ ($ name :: Fetch,) *) ; #
[allow(unused_variables)] fn
initialize(resources : & mut Resources, system_id : Option
< SystemId >)
{ $ ($ name :: initialize(resources, system_id) ;) * }
} # [allow(unused_variables)] # [allow(non_snake_case)] impl <
$ ($ name : UnsafeClone), * > UnsafeClone for($ ($ name,) *)
{
unsafe fn unsafe_clone(& self) -> Self
{
let($ ($ name,) *) = self ;
($ ($ name . unsafe_clone(),) *)
}
}
} ;
}
impl <'a, O: FetchResource<'a>, N: FetchResource<'a>,
M: FetchResource<'a>, L: FetchResource<'a>,
K: FetchResource<'a>, J: FetchResource<'a>,
I: FetchResource<'a>, H: FetchResource<'a>,
G: FetchResource<'a>, F: FetchResource<'a>,
E: FetchResource<'a>, D: FetchResource<'a>,
C: FetchResource<'a>, B: FetchResource<'a>,
A: FetchResource<'a>> FetchResource<'a> for
(O, N, M, L, K, J, I, H, G, F, E, D, C, B, A) {
type Item =
(O::Item, N::Item, M::Item, L::Item, K::Item, J::Item, I::Item,
H::Item, G::Item, F::Item, E::Item, D::Item, C::Item, B::Item,
A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
O::borrow(resources);
N::borrow(resources);
M::borrow(resources);
L::borrow(resources);
K::borrow(resources);
J::borrow(resources);
I::borrow(resources);
H::borrow(resources);
G::borrow(resources);
F::borrow(resources);
E::borrow(resources);
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
O::release(resources);
N::release(resources);
M::release(resources);
L::release(resources);
K::release(resources);
J::release(resources);
I::release(resources);
H::release(resources);
G::release(resources);
F::release(resources);
E::release(resources);
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(O::get(resources, system_id), N::get(resources, system_id),
M::get(resources, system_id), L::get(resources, system_id),
K::get(resources, system_id), J::get(resources, system_id),
I::get(resources, system_id), H::get(resources, system_id),
G::get(resources, system_id), F::get(resources, system_id),
E::get(resources, system_id), D::get(resources, system_id),
C::get(resources, system_id), B::get(resources, system_id),
A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&O::access());
access.union(&N::access());
access.union(&M::access());
access.union(&L::access());
access.union(&K::access());
access.union(&J::access());
access.union(&I::access());
access.union(&H::access());
access.union(&G::access());
access.union(&F::access());
access.union(&E::access());
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <O: ResourceQuery, N: ResourceQuery, M: ResourceQuery,
L: ResourceQuery, K: ResourceQuery, J: ResourceQuery,
I: ResourceQuery, H: ResourceQuery, G: ResourceQuery,
F: ResourceQuery, E: ResourceQuery, D: ResourceQuery,
C: ResourceQuery, B: ResourceQuery, A: ResourceQuery>
ResourceQuery for (O, N, M, L, K, J, I, H, G, F, E, D, C, B, A) {
type Fetch =
(O::Fetch, N::Fetch, M::Fetch, L::Fetch, K::Fetch, J::Fetch,
I::Fetch, H::Fetch, G::Fetch, F::Fetch, E::Fetch, D::Fetch,
C::Fetch, B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
O::initialize(resources, system_id);
N::initialize(resources, system_id);
M::initialize(resources, system_id);
L::initialize(resources, system_id);
K::initialize(resources, system_id);
J::initialize(resources, system_id);
I::initialize(resources, system_id);
H::initialize(resources, system_id);
G::initialize(resources, system_id);
F::initialize(resources, system_id);
E::initialize(resources, system_id);
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <O: UnsafeClone, N: UnsafeClone, M: UnsafeClone, L: UnsafeClone,
K: UnsafeClone, J: UnsafeClone, I: UnsafeClone, H: UnsafeClone,
G: UnsafeClone, F: UnsafeClone, E: UnsafeClone, D: UnsafeClone,
C: UnsafeClone, B: UnsafeClone, A: UnsafeClone> UnsafeClone for
(O, N, M, L, K, J, I, H, G, F, E, D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (O, N, M, L, K, J, I, H, G, F, E, D, C, B, A) = self;
(O.unsafe_clone(), N.unsafe_clone(), M.unsafe_clone(),
L.unsafe_clone(), K.unsafe_clone(), J.unsafe_clone(),
I.unsafe_clone(), H.unsafe_clone(), G.unsafe_clone(),
F.unsafe_clone(), E.unsafe_clone(), D.unsafe_clone(),
C.unsafe_clone(), B.unsafe_clone(), A.unsafe_clone())
}
}
impl <'a, N: FetchResource<'a>, M: FetchResource<'a>,
L: FetchResource<'a>, K: FetchResource<'a>,
J: FetchResource<'a>, I: FetchResource<'a>,
H: FetchResource<'a>, G: FetchResource<'a>,
F: FetchResource<'a>, E: FetchResource<'a>,
D: FetchResource<'a>, C: FetchResource<'a>,
B: FetchResource<'a>, A: FetchResource<'a>> FetchResource<'a>
for (N, M, L, K, J, I, H, G, F, E, D, C, B, A) {
type Item =
(N::Item, M::Item, L::Item, K::Item, J::Item, I::Item, H::Item,
G::Item, F::Item, E::Item, D::Item, C::Item, B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
N::borrow(resources);
M::borrow(resources);
L::borrow(resources);
K::borrow(resources);
J::borrow(resources);
I::borrow(resources);
H::borrow(resources);
G::borrow(resources);
F::borrow(resources);
E::borrow(resources);
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
N::release(resources);
M::release(resources);
L::release(resources);
K::release(resources);
J::release(resources);
I::release(resources);
H::release(resources);
G::release(resources);
F::release(resources);
E::release(resources);
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(N::get(resources, system_id), M::get(resources, system_id),
L::get(resources, system_id), K::get(resources, system_id),
J::get(resources, system_id), I::get(resources, system_id),
H::get(resources, system_id), G::get(resources, system_id),
F::get(resources, system_id), E::get(resources, system_id),
D::get(resources, system_id), C::get(resources, system_id),
B::get(resources, system_id), A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&N::access());
access.union(&M::access());
access.union(&L::access());
access.union(&K::access());
access.union(&J::access());
access.union(&I::access());
access.union(&H::access());
access.union(&G::access());
access.union(&F::access());
access.union(&E::access());
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <N: ResourceQuery, M: ResourceQuery, L: ResourceQuery,
K: ResourceQuery, J: ResourceQuery, I: ResourceQuery,
H: ResourceQuery, G: ResourceQuery, F: ResourceQuery,
E: ResourceQuery, D: ResourceQuery, C: ResourceQuery,
B: ResourceQuery, A: ResourceQuery> ResourceQuery for
(N, M, L, K, J, I, H, G, F, E, D, C, B, A) {
type Fetch =
(N::Fetch, M::Fetch, L::Fetch, K::Fetch, J::Fetch, I::Fetch,
H::Fetch, G::Fetch, F::Fetch, E::Fetch, D::Fetch, C::Fetch,
B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
N::initialize(resources, system_id);
M::initialize(resources, system_id);
L::initialize(resources, system_id);
K::initialize(resources, system_id);
J::initialize(resources, system_id);
I::initialize(resources, system_id);
H::initialize(resources, system_id);
G::initialize(resources, system_id);
F::initialize(resources, system_id);
E::initialize(resources, system_id);
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <N: UnsafeClone, M: UnsafeClone, L: UnsafeClone, K: UnsafeClone,
J: UnsafeClone, I: UnsafeClone, H: UnsafeClone, G: UnsafeClone,
F: UnsafeClone, E: UnsafeClone, D: UnsafeClone, C: UnsafeClone,
B: UnsafeClone, A: UnsafeClone> UnsafeClone for
(N, M, L, K, J, I, H, G, F, E, D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (N, M, L, K, J, I, H, G, F, E, D, C, B, A) = self;
(N.unsafe_clone(), M.unsafe_clone(), L.unsafe_clone(),
K.unsafe_clone(), J.unsafe_clone(), I.unsafe_clone(),
H.unsafe_clone(), G.unsafe_clone(), F.unsafe_clone(),
E.unsafe_clone(), D.unsafe_clone(), C.unsafe_clone(),
B.unsafe_clone(), A.unsafe_clone())
}
}
impl <'a, M: FetchResource<'a>, L: FetchResource<'a>,
K: FetchResource<'a>, J: FetchResource<'a>,
I: FetchResource<'a>, H: FetchResource<'a>,
G: FetchResource<'a>, F: FetchResource<'a>,
E: FetchResource<'a>, D: FetchResource<'a>,
C: FetchResource<'a>, B: FetchResource<'a>,
A: FetchResource<'a>> FetchResource<'a> for
(M, L, K, J, I, H, G, F, E, D, C, B, A) {
type Item =
(M::Item, L::Item, K::Item, J::Item, I::Item, H::Item, G::Item,
F::Item, E::Item, D::Item, C::Item, B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
M::borrow(resources);
L::borrow(resources);
K::borrow(resources);
J::borrow(resources);
I::borrow(resources);
H::borrow(resources);
G::borrow(resources);
F::borrow(resources);
E::borrow(resources);
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
M::release(resources);
L::release(resources);
K::release(resources);
J::release(resources);
I::release(resources);
H::release(resources);
G::release(resources);
F::release(resources);
E::release(resources);
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(M::get(resources, system_id), L::get(resources, system_id),
K::get(resources, system_id), J::get(resources, system_id),
I::get(resources, system_id), H::get(resources, system_id),
G::get(resources, system_id), F::get(resources, system_id),
E::get(resources, system_id), D::get(resources, system_id),
C::get(resources, system_id), B::get(resources, system_id),
A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&M::access());
access.union(&L::access());
access.union(&K::access());
access.union(&J::access());
access.union(&I::access());
access.union(&H::access());
access.union(&G::access());
access.union(&F::access());
access.union(&E::access());
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <M: ResourceQuery, L: ResourceQuery, K: ResourceQuery,
J: ResourceQuery, I: ResourceQuery, H: ResourceQuery,
G: ResourceQuery, F: ResourceQuery, E: ResourceQuery,
D: ResourceQuery, C: ResourceQuery, B: ResourceQuery,
A: ResourceQuery> ResourceQuery for
(M, L, K, J, I, H, G, F, E, D, C, B, A) {
type Fetch =
(M::Fetch, L::Fetch, K::Fetch, J::Fetch, I::Fetch, H::Fetch,
G::Fetch, F::Fetch, E::Fetch, D::Fetch, C::Fetch, B::Fetch,
A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
M::initialize(resources, system_id);
L::initialize(resources, system_id);
K::initialize(resources, system_id);
J::initialize(resources, system_id);
I::initialize(resources, system_id);
H::initialize(resources, system_id);
G::initialize(resources, system_id);
F::initialize(resources, system_id);
E::initialize(resources, system_id);
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <M: UnsafeClone, L: UnsafeClone, K: UnsafeClone, J: UnsafeClone,
I: UnsafeClone, H: UnsafeClone, G: UnsafeClone, F: UnsafeClone,
E: UnsafeClone, D: UnsafeClone, C: UnsafeClone, B: UnsafeClone,
A: UnsafeClone> UnsafeClone for
(M, L, K, J, I, H, G, F, E, D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (M, L, K, J, I, H, G, F, E, D, C, B, A) = self;
(M.unsafe_clone(), L.unsafe_clone(), K.unsafe_clone(),
J.unsafe_clone(), I.unsafe_clone(), H.unsafe_clone(),
G.unsafe_clone(), F.unsafe_clone(), E.unsafe_clone(),
D.unsafe_clone(), C.unsafe_clone(), B.unsafe_clone(),
A.unsafe_clone())
}
}
impl <'a, L: FetchResource<'a>, K: FetchResource<'a>,
J: FetchResource<'a>, I: FetchResource<'a>,
H: FetchResource<'a>, G: FetchResource<'a>,
F: FetchResource<'a>, E: FetchResource<'a>,
D: FetchResource<'a>, C: FetchResource<'a>,
B: FetchResource<'a>, A: FetchResource<'a>> FetchResource<'a>
for (L, K, J, I, H, G, F, E, D, C, B, A) {
type Item =
(L::Item, K::Item, J::Item, I::Item, H::Item, G::Item, F::Item,
E::Item, D::Item, C::Item, B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
L::borrow(resources);
K::borrow(resources);
J::borrow(resources);
I::borrow(resources);
H::borrow(resources);
G::borrow(resources);
F::borrow(resources);
E::borrow(resources);
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
L::release(resources);
K::release(resources);
J::release(resources);
I::release(resources);
H::release(resources);
G::release(resources);
F::release(resources);
E::release(resources);
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(L::get(resources, system_id), K::get(resources, system_id),
J::get(resources, system_id), I::get(resources, system_id),
H::get(resources, system_id), G::get(resources, system_id),
F::get(resources, system_id), E::get(resources, system_id),
D::get(resources, system_id), C::get(resources, system_id),
B::get(resources, system_id), A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&L::access());
access.union(&K::access());
access.union(&J::access());
access.union(&I::access());
access.union(&H::access());
access.union(&G::access());
access.union(&F::access());
access.union(&E::access());
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <L: ResourceQuery, K: ResourceQuery, J: ResourceQuery,
I: ResourceQuery, H: ResourceQuery, G: ResourceQuery,
F: ResourceQuery, E: ResourceQuery, D: ResourceQuery,
C: ResourceQuery, B: ResourceQuery, A: ResourceQuery>
ResourceQuery for (L, K, J, I, H, G, F, E, D, C, B, A) {
type Fetch =
(L::Fetch, K::Fetch, J::Fetch, I::Fetch, H::Fetch, G::Fetch,
F::Fetch, E::Fetch, D::Fetch, C::Fetch, B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
L::initialize(resources, system_id);
K::initialize(resources, system_id);
J::initialize(resources, system_id);
I::initialize(resources, system_id);
H::initialize(resources, system_id);
G::initialize(resources, system_id);
F::initialize(resources, system_id);
E::initialize(resources, system_id);
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <L: UnsafeClone, K: UnsafeClone, J: UnsafeClone, I: UnsafeClone,
H: UnsafeClone, G: UnsafeClone, F: UnsafeClone, E: UnsafeClone,
D: UnsafeClone, C: UnsafeClone, B: UnsafeClone, A: UnsafeClone>
UnsafeClone for (L, K, J, I, H, G, F, E, D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (L, K, J, I, H, G, F, E, D, C, B, A) = self;
(L.unsafe_clone(), K.unsafe_clone(), J.unsafe_clone(),
I.unsafe_clone(), H.unsafe_clone(), G.unsafe_clone(),
F.unsafe_clone(), E.unsafe_clone(), D.unsafe_clone(),
C.unsafe_clone(), B.unsafe_clone(), A.unsafe_clone())
}
}
impl <'a, K: FetchResource<'a>, J: FetchResource<'a>,
I: FetchResource<'a>, H: FetchResource<'a>,
G: FetchResource<'a>, F: FetchResource<'a>,
E: FetchResource<'a>, D: FetchResource<'a>,
C: FetchResource<'a>, B: FetchResource<'a>,
A: FetchResource<'a>> FetchResource<'a> for
(K, J, I, H, G, F, E, D, C, B, A) {
type Item =
(K::Item, J::Item, I::Item, H::Item, G::Item, F::Item, E::Item,
D::Item, C::Item, B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
K::borrow(resources);
J::borrow(resources);
I::borrow(resources);
H::borrow(resources);
G::borrow(resources);
F::borrow(resources);
E::borrow(resources);
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
K::release(resources);
J::release(resources);
I::release(resources);
H::release(resources);
G::release(resources);
F::release(resources);
E::release(resources);
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(K::get(resources, system_id), J::get(resources, system_id),
I::get(resources, system_id), H::get(resources, system_id),
G::get(resources, system_id), F::get(resources, system_id),
E::get(resources, system_id), D::get(resources, system_id),
C::get(resources, system_id), B::get(resources, system_id),
A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&K::access());
access.union(&J::access());
access.union(&I::access());
access.union(&H::access());
access.union(&G::access());
access.union(&F::access());
access.union(&E::access());
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <K: ResourceQuery, J: ResourceQuery, I: ResourceQuery,
H: ResourceQuery, G: ResourceQuery, F: ResourceQuery,
E: ResourceQuery, D: ResourceQuery, C: ResourceQuery,
B: ResourceQuery, A: ResourceQuery> ResourceQuery for
(K, J, I, H, G, F, E, D, C, B, A) {
type Fetch =
(K::Fetch, J::Fetch, I::Fetch, H::Fetch, G::Fetch, F::Fetch,
E::Fetch, D::Fetch, C::Fetch, B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
K::initialize(resources, system_id);
J::initialize(resources, system_id);
I::initialize(resources, system_id);
H::initialize(resources, system_id);
G::initialize(resources, system_id);
F::initialize(resources, system_id);
E::initialize(resources, system_id);
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <K: UnsafeClone, J: UnsafeClone, I: UnsafeClone, H: UnsafeClone,
G: UnsafeClone, F: UnsafeClone, E: UnsafeClone, D: UnsafeClone,
C: UnsafeClone, B: UnsafeClone, A: UnsafeClone> UnsafeClone for
(K, J, I, H, G, F, E, D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (K, J, I, H, G, F, E, D, C, B, A) = self;
(K.unsafe_clone(), J.unsafe_clone(), I.unsafe_clone(),
H.unsafe_clone(), G.unsafe_clone(), F.unsafe_clone(),
E.unsafe_clone(), D.unsafe_clone(), C.unsafe_clone(),
B.unsafe_clone(), A.unsafe_clone())
}
}
impl <'a, J: FetchResource<'a>, I: FetchResource<'a>,
H: FetchResource<'a>, G: FetchResource<'a>,
F: FetchResource<'a>, E: FetchResource<'a>,
D: FetchResource<'a>, C: FetchResource<'a>,
B: FetchResource<'a>, A: FetchResource<'a>> FetchResource<'a>
for (J, I, H, G, F, E, D, C, B, A) {
type Item =
(J::Item, I::Item, H::Item, G::Item, F::Item, E::Item, D::Item,
C::Item, B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
J::borrow(resources);
I::borrow(resources);
H::borrow(resources);
G::borrow(resources);
F::borrow(resources);
E::borrow(resources);
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
J::release(resources);
I::release(resources);
H::release(resources);
G::release(resources);
F::release(resources);
E::release(resources);
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(J::get(resources, system_id), I::get(resources, system_id),
H::get(resources, system_id), G::get(resources, system_id),
F::get(resources, system_id), E::get(resources, system_id),
D::get(resources, system_id), C::get(resources, system_id),
B::get(resources, system_id), A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&J::access());
access.union(&I::access());
access.union(&H::access());
access.union(&G::access());
access.union(&F::access());
access.union(&E::access());
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <J: ResourceQuery, I: ResourceQuery, H: ResourceQuery,
G: ResourceQuery, F: ResourceQuery, E: ResourceQuery,
D: ResourceQuery, C: ResourceQuery, B: ResourceQuery,
A: ResourceQuery> ResourceQuery for
(J, I, H, G, F, E, D, C, B, A) {
type Fetch =
(J::Fetch, I::Fetch, H::Fetch, G::Fetch, F::Fetch, E::Fetch,
D::Fetch, C::Fetch, B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
J::initialize(resources, system_id);
I::initialize(resources, system_id);
H::initialize(resources, system_id);
G::initialize(resources, system_id);
F::initialize(resources, system_id);
E::initialize(resources, system_id);
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <J: UnsafeClone, I: UnsafeClone, H: UnsafeClone, G: UnsafeClone,
F: UnsafeClone, E: UnsafeClone, D: UnsafeClone, C: UnsafeClone,
B: UnsafeClone, A: UnsafeClone> UnsafeClone for
(J, I, H, G, F, E, D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (J, I, H, G, F, E, D, C, B, A) = self;
(J.unsafe_clone(), I.unsafe_clone(), H.unsafe_clone(),
G.unsafe_clone(), F.unsafe_clone(), E.unsafe_clone(),
D.unsafe_clone(), C.unsafe_clone(), B.unsafe_clone(),
A.unsafe_clone())
}
}
impl <'a, I: FetchResource<'a>, H: FetchResource<'a>,
G: FetchResource<'a>, F: FetchResource<'a>,
E: FetchResource<'a>, D: FetchResource<'a>,
C: FetchResource<'a>, B: FetchResource<'a>,
A: FetchResource<'a>> FetchResource<'a> for
(I, H, G, F, E, D, C, B, A) {
type Item =
(I::Item, H::Item, G::Item, F::Item, E::Item, D::Item, C::Item,
B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
I::borrow(resources);
H::borrow(resources);
G::borrow(resources);
F::borrow(resources);
E::borrow(resources);
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
I::release(resources);
H::release(resources);
G::release(resources);
F::release(resources);
E::release(resources);
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(I::get(resources, system_id), H::get(resources, system_id),
G::get(resources, system_id), F::get(resources, system_id),
E::get(resources, system_id), D::get(resources, system_id),
C::get(resources, system_id), B::get(resources, system_id),
A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&I::access());
access.union(&H::access());
access.union(&G::access());
access.union(&F::access());
access.union(&E::access());
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <I: ResourceQuery, H: ResourceQuery, G: ResourceQuery,
F: ResourceQuery, E: ResourceQuery, D: ResourceQuery,
C: ResourceQuery, B: ResourceQuery, A: ResourceQuery>
ResourceQuery for (I, H, G, F, E, D, C, B, A) {
type Fetch =
(I::Fetch, H::Fetch, G::Fetch, F::Fetch, E::Fetch, D::Fetch,
C::Fetch, B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
I::initialize(resources, system_id);
H::initialize(resources, system_id);
G::initialize(resources, system_id);
F::initialize(resources, system_id);
E::initialize(resources, system_id);
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <I: UnsafeClone, H: UnsafeClone, G: UnsafeClone, F: UnsafeClone,
E: UnsafeClone, D: UnsafeClone, C: UnsafeClone, B: UnsafeClone,
A: UnsafeClone> UnsafeClone for (I, H, G, F, E, D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (I, H, G, F, E, D, C, B, A) = self;
(I.unsafe_clone(), H.unsafe_clone(), G.unsafe_clone(),
F.unsafe_clone(), E.unsafe_clone(), D.unsafe_clone(),
C.unsafe_clone(), B.unsafe_clone(), A.unsafe_clone())
}
}
impl <'a, H: FetchResource<'a>, G: FetchResource<'a>,
F: FetchResource<'a>, E: FetchResource<'a>,
D: FetchResource<'a>, C: FetchResource<'a>,
B: FetchResource<'a>, A: FetchResource<'a>> FetchResource<'a>
for (H, G, F, E, D, C, B, A) {
type Item =
(H::Item, G::Item, F::Item, E::Item, D::Item, C::Item, B::Item,
A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
H::borrow(resources);
G::borrow(resources);
F::borrow(resources);
E::borrow(resources);
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
H::release(resources);
G::release(resources);
F::release(resources);
E::release(resources);
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(H::get(resources, system_id), G::get(resources, system_id),
F::get(resources, system_id), E::get(resources, system_id),
D::get(resources, system_id), C::get(resources, system_id),
B::get(resources, system_id), A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&H::access());
access.union(&G::access());
access.union(&F::access());
access.union(&E::access());
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <H: ResourceQuery, G: ResourceQuery, F: ResourceQuery,
E: ResourceQuery, D: ResourceQuery, C: ResourceQuery,
B: ResourceQuery, A: ResourceQuery> ResourceQuery for
(H, G, F, E, D, C, B, A) {
type Fetch =
(H::Fetch, G::Fetch, F::Fetch, E::Fetch, D::Fetch, C::Fetch,
B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
H::initialize(resources, system_id);
G::initialize(resources, system_id);
F::initialize(resources, system_id);
E::initialize(resources, system_id);
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <H: UnsafeClone, G: UnsafeClone, F: UnsafeClone, E: UnsafeClone,
D: UnsafeClone, C: UnsafeClone, B: UnsafeClone, A: UnsafeClone>
UnsafeClone for (H, G, F, E, D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (H, G, F, E, D, C, B, A) = self;
(H.unsafe_clone(), G.unsafe_clone(), F.unsafe_clone(),
E.unsafe_clone(), D.unsafe_clone(), C.unsafe_clone(),
B.unsafe_clone(), A.unsafe_clone())
}
}
impl <'a, G: FetchResource<'a>, F: FetchResource<'a>,
E: FetchResource<'a>, D: FetchResource<'a>,
C: FetchResource<'a>, B: FetchResource<'a>,
A: FetchResource<'a>> FetchResource<'a> for
(G, F, E, D, C, B, A) {
type Item =
(G::Item, F::Item, E::Item, D::Item, C::Item, B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
G::borrow(resources);
F::borrow(resources);
E::borrow(resources);
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
G::release(resources);
F::release(resources);
E::release(resources);
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(G::get(resources, system_id), F::get(resources, system_id),
E::get(resources, system_id), D::get(resources, system_id),
C::get(resources, system_id), B::get(resources, system_id),
A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&G::access());
access.union(&F::access());
access.union(&E::access());
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <G: ResourceQuery, F: ResourceQuery, E: ResourceQuery,
D: ResourceQuery, C: ResourceQuery, B: ResourceQuery,
A: ResourceQuery> ResourceQuery for (G, F, E, D, C, B, A) {
type Fetch =
(G::Fetch, F::Fetch, E::Fetch, D::Fetch, C::Fetch, B::Fetch,
A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
G::initialize(resources, system_id);
F::initialize(resources, system_id);
E::initialize(resources, system_id);
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <G: UnsafeClone, F: UnsafeClone, E: UnsafeClone, D: UnsafeClone,
C: UnsafeClone, B: UnsafeClone, A: UnsafeClone> UnsafeClone for
(G, F, E, D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (G, F, E, D, C, B, A) = self;
(G.unsafe_clone(), F.unsafe_clone(), E.unsafe_clone(),
D.unsafe_clone(), C.unsafe_clone(), B.unsafe_clone(),
A.unsafe_clone())
}
}
impl <'a, F: FetchResource<'a>, E: FetchResource<'a>,
D: FetchResource<'a>, C: FetchResource<'a>,
B: FetchResource<'a>, A: FetchResource<'a>> FetchResource<'a>
for (F, E, D, C, B, A) {
type Item =
(F::Item, E::Item, D::Item, C::Item, B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
F::borrow(resources);
E::borrow(resources);
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
F::release(resources);
E::release(resources);
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(F::get(resources, system_id), E::get(resources, system_id),
D::get(resources, system_id), C::get(resources, system_id),
B::get(resources, system_id), A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&F::access());
access.union(&E::access());
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <F: ResourceQuery, E: ResourceQuery, D: ResourceQuery,
C: ResourceQuery, B: ResourceQuery, A: ResourceQuery>
ResourceQuery for (F, E, D, C, B, A) {
type Fetch =
(F::Fetch, E::Fetch, D::Fetch, C::Fetch, B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
F::initialize(resources, system_id);
E::initialize(resources, system_id);
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <F: UnsafeClone, E: UnsafeClone, D: UnsafeClone, C: UnsafeClone,
B: UnsafeClone, A: UnsafeClone> UnsafeClone for
(F, E, D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (F, E, D, C, B, A) = self;
(F.unsafe_clone(), E.unsafe_clone(), D.unsafe_clone(),
C.unsafe_clone(), B.unsafe_clone(), A.unsafe_clone())
}
}
impl <'a, E: FetchResource<'a>, D: FetchResource<'a>,
C: FetchResource<'a>, B: FetchResource<'a>,
A: FetchResource<'a>> FetchResource<'a> for (E, D, C, B, A) {
type Item = (E::Item, D::Item, C::Item, B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
E::borrow(resources);
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
E::release(resources);
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(E::get(resources, system_id), D::get(resources, system_id),
C::get(resources, system_id), B::get(resources, system_id),
A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&E::access());
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <E: ResourceQuery, D: ResourceQuery, C: ResourceQuery,
B: ResourceQuery, A: ResourceQuery> ResourceQuery for
(E, D, C, B, A) {
type Fetch = (E::Fetch, D::Fetch, C::Fetch, B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
E::initialize(resources, system_id);
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <E: UnsafeClone, D: UnsafeClone, C: UnsafeClone, B: UnsafeClone,
A: UnsafeClone> UnsafeClone for (E, D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (E, D, C, B, A) = self;
(E.unsafe_clone(), D.unsafe_clone(), C.unsafe_clone(),
B.unsafe_clone(), A.unsafe_clone())
}
}
impl <'a, D: FetchResource<'a>, C: FetchResource<'a>,
B: FetchResource<'a>, A: FetchResource<'a>> FetchResource<'a>
for (D, C, B, A) {
type Item = (D::Item, C::Item, B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
D::borrow(resources);
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
D::release(resources);
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(D::get(resources, system_id), C::get(resources, system_id),
B::get(resources, system_id), A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&D::access());
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <D: ResourceQuery, C: ResourceQuery, B: ResourceQuery,
A: ResourceQuery> ResourceQuery for (D, C, B, A) {
type Fetch = (D::Fetch, C::Fetch, B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
D::initialize(resources, system_id);
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <D: UnsafeClone, C: UnsafeClone, B: UnsafeClone, A: UnsafeClone>
UnsafeClone for (D, C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (D, C, B, A) = self;
(D.unsafe_clone(), C.unsafe_clone(), B.unsafe_clone(),
A.unsafe_clone())
}
}
impl <'a, C: FetchResource<'a>, B: FetchResource<'a>,
A: FetchResource<'a>> FetchResource<'a> for (C, B, A) {
type Item = (C::Item, B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
C::borrow(resources);
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
C::release(resources);
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(C::get(resources, system_id), B::get(resources, system_id),
A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&C::access());
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <C: ResourceQuery, B: ResourceQuery, A: ResourceQuery>
ResourceQuery for (C, B, A) {
type Fetch = (C::Fetch, B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
C::initialize(resources, system_id);
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <C: UnsafeClone, B: UnsafeClone, A: UnsafeClone> UnsafeClone for
(C, B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (C, B, A) = self;
(C.unsafe_clone(), B.unsafe_clone(), A.unsafe_clone())
}
}
impl <'a, B: FetchResource<'a>, A: FetchResource<'a>>
FetchResource<'a> for (B, A) {
type Item = (B::Item, A::Item);
#[allow(unused_variables)]
fn borrow(resources: &Resources) {
B::borrow(resources);
A::borrow(resources);
}
#[allow(unused_variables)]
fn release(resources: &Resources) {
B::release(resources);
A::release(resources);
}
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(B::get(resources, system_id), A::get(resources, system_id))
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&B::access());
access.union(&A::access());
access
}
}
impl <B: ResourceQuery, A: ResourceQuery> ResourceQuery for (B, A) {
type Fetch = (B::Fetch, A::Fetch);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
B::initialize(resources, system_id);
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <B: UnsafeClone, A: UnsafeClone> UnsafeClone for (B, A) {
unsafe fn unsafe_clone(&self) -> Self {
let (B, A) = self;
(B.unsafe_clone(), A.unsafe_clone())
}
}
impl <'a, A: FetchResource<'a>> FetchResource<'a> for (A,) {
type Item = (A::Item,);
#[allow(unused_variables)]
fn borrow(resources: &Resources) { A::borrow(resources); }
#[allow(unused_variables)]
fn release(resources: &Resources) { A::release(resources); }
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
(A::get(resources, system_id),)
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access.union(&A::access());
access
}
}
impl <A: ResourceQuery> ResourceQuery for (A,) {
type Fetch = (A::Fetch,);
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
A::initialize(resources, system_id);
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl <A: UnsafeClone> UnsafeClone for (A,) {
unsafe fn unsafe_clone(&self) -> Self {
let (A,) = self;
(A.unsafe_clone(),)
}
}
impl <'a> FetchResource<'a> for () {
type Item = ();
#[allow(unused_variables)]
fn borrow(resources: &Resources) { }
#[allow(unused_variables)]
fn release(resources: &Resources) { }
#[allow(unused_variables)]
unsafe fn get(resources: &'a Resources,
system_id: Option<SystemId>) -> Self::Item {
()
}
#[allow(unused_mut)]
fn access() -> TypeAccess {
let mut access = TypeAccess::default();
access
}
}
impl ResourceQuery for () {
type Fetch = ();
#[allow(unused_variables)]
fn initialize(resources: &mut Resources,
system_id: Option<SystemId>) {
}
}
#[allow(unused_variables)]
#[allow(non_snake_case)]
impl UnsafeClone for () {
unsafe fn unsafe_clone(&self) -> Self { let () = self; () }
}
}
mod resources {
use super::{FetchResource, ResourceQuery};
use crate::system::SystemId;
use core::any::TypeId;
use bevy_hecs::{Archetype, Ref, RefMut, TypeInfo};
use std::{collections::HashMap, ptr::NonNull};
/// A Resource type
pub trait Resource: Send + Sync + 'static { }
impl <T: Send + Sync + 'static> Resource for T { }
pub(crate) struct ResourceData {
archetype: Archetype,
default_index: Option<u32>,
system_id_to_archetype_index: HashMap<u32, u32>,
}
pub enum ResourceIndex { Global, System(SystemId), }
/// A collection of resource instances identified by their type.
pub struct Resources {
pub(crate) resource_data: HashMap<TypeId, ResourceData>,
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::core::default::Default for Resources {
#[inline]
fn default() -> Resources {
Resources{resource_data: ::core::default::Default::default(),}
}
}
impl Resources {
pub fn insert<T: Resource>(&mut self, resource: T) {
self.insert_resource(resource, ResourceIndex::Global);
}
pub fn contains<T: Resource>(&self) -> bool {
self.get_resource::<T>(ResourceIndex::Global).is_some()
}
pub fn get<T: Resource>(&self) -> Option<Ref<'_, T>> {
self.get_resource(ResourceIndex::Global)
}
pub fn get_mut<T: Resource>(&self) -> Option<RefMut<'_, T>> {
self.get_resource_mut(ResourceIndex::Global)
}
pub fn get_local<'a, T: Resource>(&'a self, id: SystemId)
-> Option<Ref<'a, T>> {
self.get_resource(ResourceIndex::System(id))
}
pub fn get_local_mut<'a, T: Resource>(&'a self, id: SystemId)
-> Option<RefMut<'a, T>> {
self.get_resource_mut(ResourceIndex::System(id))
}
pub fn insert_local<T: Resource>(&mut self, id: SystemId,
resource: T) {
self.insert_resource(resource, ResourceIndex::System(id))
}
fn insert_resource<T: Resource>(&mut self, mut resource: T,
resource_index: ResourceIndex) {
let type_id = TypeId::of::<T>();
let data =
self.resource_data.entry(type_id).or_insert_with(||
{
let mut types =
Vec::new();
types.push(TypeInfo::of::<T>());
ResourceData{archetype:
Archetype::new(types),
default_index:
None,
system_id_to_archetype_index:
HashMap::new(),}
});
let archetype = &mut data.archetype;
let mut added = false;
let index =
match resource_index {
ResourceIndex::Global =>
*data.default_index.get_or_insert_with(||
{
added =
true;
archetype.len()
}),
ResourceIndex::System(id) =>
*data.system_id_to_archetype_index.entry(id.0).or_insert_with(||
{
added
=
true;
archetype.len()
}),
};
if index == archetype.len() {
unsafe { archetype.allocate(index) };
} else if index > archetype.len() {
{
::std::rt::begin_panic("attempted to access index beyond 'current_capacity + 1'")
}
}
unsafe {
let resource_ptr = (&mut resource as *mut T).cast::<u8>();
archetype.put_dynamic(resource_ptr, type_id,
core::mem::size_of::<T>(), index,
added);
std::mem::forget(resource);
}
}
fn get_resource<T: Resource>(&self, resource_index: ResourceIndex)
-> Option<Ref<'_, T>> {
self.resource_data.get(&TypeId::of::<T>()).and_then(|data|
unsafe
{
let index =
match resource_index
{
ResourceIndex::Global
=>
data.default_index?,
ResourceIndex::System(id)
=>
*data.system_id_to_archetype_index.get(&id.0)?,
};
Ref::new(&data.archetype,
index).ok()
})
}
fn get_resource_mut<T: Resource>(&self,
resource_index: ResourceIndex)
-> Option<RefMut<'_, T>> {
self.resource_data.get(&TypeId::of::<T>()).and_then(|data|
unsafe
{
let index =
match resource_index
{
ResourceIndex::Global
=>
data.default_index?,
ResourceIndex::System(id)
=>
*data.system_id_to_archetype_index.get(&id.0)?,
};
RefMut::new(&data.archetype,
index).ok()
})
}
pub fn query<Q: ResourceQuery>(&self)
-> <Q::Fetch as FetchResource>::Item {
unsafe { Q::Fetch::get(&self, None) }
}
pub fn query_system<Q: ResourceQuery>(&self, id: SystemId)
-> <Q::Fetch as FetchResource>::Item {
unsafe { Q::Fetch::get(&self, Some(id)) }
}
#[inline]
pub unsafe fn get_unsafe_ref<T: Resource>(&self,
resource_index:
ResourceIndex)
-> NonNull<T> {
self.resource_data.get(&TypeId::of::<T>()).and_then(|data|
{
let index =
match resource_index
{
ResourceIndex::Global
=>
data.default_index?,
ResourceIndex::System(id)
=>
{
data.system_id_to_archetype_index.get(&id.0).cloned()?
}
};
Some(NonNull::new_unchecked(data.archetype.get::<T>()?.as_ptr().add(index
as
usize)))
}).unwrap_or_else(||
{
::std::rt::begin_panic_fmt(&::core::fmt::Arguments::new_v1(&["Resource does not exist "],
&match (&std::any::type_name::<T>(),)
{
(arg0,)
=>
[::core::fmt::ArgumentV1::new(arg0,
::core::fmt::Display::fmt)],
}))
})
}
pub fn borrow<T: Resource>(&self) {
if let Some(data) = self.resource_data.get(&TypeId::of::<T>())
{
data.archetype.borrow::<T>();
}
}
pub fn release<T: Resource>(&self) {
if let Some(data) = self.resource_data.get(&TypeId::of::<T>())
{
data.archetype.release::<T>();
}
}
pub fn borrow_mut<T: Resource>(&self) {
if let Some(data) = self.resource_data.get(&TypeId::of::<T>())
{
data.archetype.borrow_mut::<T>();
}
}
pub fn release_mut<T: Resource>(&self) {
if let Some(data) = self.resource_data.get(&TypeId::of::<T>())
{
data.archetype.release_mut::<T>();
}
}
}
unsafe impl Send for Resources { }
unsafe impl Sync for Resources { }
/// Creates `Self` using data from the `Resources` collection
pub trait FromResources {
/// Creates `Self` using data from the `Resources` collection
fn from_resources(resources: &Resources)
-> Self;
}
impl <T> FromResources for T where T: Default {
fn from_resources(_resources: &Resources) -> Self {
Self::default()
}
}
}
pub use resource_query::*;
pub use resources::*;
}
mod schedule {
mod parallel_executor {
use super::Schedule;
use crate::{resource::Resources,
system::{ArchetypeAccess, System, ThreadLocalExecution,
TypeAccess}};
use crossbeam_channel::{Receiver, Sender};
use fixedbitset::FixedBitSet;
use bevy_hecs::{ArchetypesGeneration, World};
use rayon::ScopeFifo;
use std::{ops::Range, sync::{Arc, Mutex}};
/// Executes each schedule stage in parallel by analyzing system dependencies.
/// System execution order is undefined except under the following conditions:
/// * systems in earlier stages run before systems in later stages
/// * in a given stage, systems that mutate archetype X cannot run before systems registered before them that read/write archetype X
/// * in a given stage, systems the read archetype X cannot run before systems registered before them that write archetype X
/// * in a given stage, systems that mutate resource Y cannot run before systems registered before them that read/write resource Y
/// * in a given stage, systems the read resource Y cannot run before systems registered before them that write resource Y
pub struct ParallelExecutor {
stages: Vec<ExecutorStage>,
last_schedule_generation: usize,
clear_trackers: bool,
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::core::fmt::Debug for ParallelExecutor {
fn fmt(&self, f: &mut ::core::fmt::Formatter)
-> ::core::fmt::Result {
match *self {
ParallelExecutor {
stages: ref __self_0_0,
last_schedule_generation: ref __self_0_1,
clear_trackers: ref __self_0_2 } => {
let mut debug_trait_builder =
f.debug_struct("ParallelExecutor");
let _ =
debug_trait_builder.field("stages",
&&(*__self_0_0));
let _ =
debug_trait_builder.field("last_schedule_generation",
&&(*__self_0_1));
let _ =
debug_trait_builder.field("clear_trackers",
&&(*__self_0_2));
debug_trait_builder.finish()
}
}
}
}
impl Default for ParallelExecutor {
fn default() -> Self {
Self{stages: Default::default(),
last_schedule_generation: usize::MAX,
clear_trackers: true,}
}
}
impl ParallelExecutor {
pub fn without_tracker_clears() -> Self {
Self{clear_trackers: false, ..Default::default()}
}
pub fn run(&mut self, schedule: &mut Schedule, world: &mut World,
resources: &mut Resources) {
let schedule_generation = schedule.generation();
let schedule_changed =
schedule.generation() != self.last_schedule_generation;
if schedule_changed {
self.stages.clear();
self.stages.resize_with(schedule.stage_order.len(),
|| ExecutorStage::default());
}
for (stage_name, executor_stage) in
schedule.stage_order.iter().zip(self.stages.iter_mut()) {
if let Some(stage_systems) =
schedule.stages.get_mut(stage_name) {
executor_stage.run(world, resources, stage_systems,
schedule_changed);
}
}
if self.clear_trackers { world.clear_trackers(); }
self.last_schedule_generation = schedule_generation;
}
}
pub struct ExecutorStage {
/// each system's set of dependencies
system_dependencies: Vec<FixedBitSet>,
/// each system's dependents (the systems that can't run until this system has run)
system_dependents: Vec<Vec<usize>>,
/// stores the indices of thread local systems in this stage, which are used during stage.prepare()
thread_local_system_indices: Vec<usize>,
next_thread_local_index: usize,
/// the currently finished systems
finished_systems: FixedBitSet,
running_systems: FixedBitSet,
sender: Sender<usize>,
receiver: Receiver<usize>,
last_archetypes_generation: ArchetypesGeneration,
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::core::fmt::Debug for ExecutorStage {
fn fmt(&self, f: &mut ::core::fmt::Formatter)
-> ::core::fmt::Result {
match *self {
ExecutorStage {
system_dependencies: ref __self_0_0,
system_dependents: ref __self_0_1,
thread_local_system_indices: ref __self_0_2,
next_thread_local_index: ref __self_0_3,
finished_systems: ref __self_0_4,
running_systems: ref __self_0_5,
sender: ref __self_0_6,
receiver: ref __self_0_7,
last_archetypes_generation: ref __self_0_8 } => {
let mut debug_trait_builder =
f.debug_struct("ExecutorStage");
let _ =
debug_trait_builder.field("system_dependencies",
&&(*__self_0_0));
let _ =
debug_trait_builder.field("system_dependents",
&&(*__self_0_1));
let _ =
debug_trait_builder.field("thread_local_system_indices",
&&(*__self_0_2));
let _ =
debug_trait_builder.field("next_thread_local_index",
&&(*__self_0_3));
let _ =
debug_trait_builder.field("finished_systems",
&&(*__self_0_4));
let _ =
debug_trait_builder.field("running_systems",
&&(*__self_0_5));
let _ =
debug_trait_builder.field("sender",
&&(*__self_0_6));
let _ =
debug_trait_builder.field("receiver",
&&(*__self_0_7));
let _ =
debug_trait_builder.field("last_archetypes_generation",
&&(*__self_0_8));
debug_trait_builder.finish()
}
}
}
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::core::clone::Clone for ExecutorStage {
#[inline]
fn clone(&self) -> ExecutorStage {
match *self {
ExecutorStage {
system_dependencies: ref __self_0_0,
system_dependents: ref __self_0_1,
thread_local_system_indices: ref __self_0_2,
next_thread_local_index: ref __self_0_3,
finished_systems: ref __self_0_4,
running_systems: ref __self_0_5,
sender: ref __self_0_6,
receiver: ref __self_0_7,
last_archetypes_generation: ref __self_0_8 } =>
ExecutorStage{system_dependencies:
::core::clone::Clone::clone(&(*__self_0_0)),
system_dependents:
::core::clone::Clone::clone(&(*__self_0_1)),
thread_local_system_indices:
::core::clone::Clone::clone(&(*__self_0_2)),
next_thread_local_index:
::core::clone::Clone::clone(&(*__self_0_3)),
finished_systems:
::core::clone::Clone::clone(&(*__self_0_4)),
running_systems:
::core::clone::Clone::clone(&(*__self_0_5)),
sender:
::core::clone::Clone::clone(&(*__self_0_6)),
receiver:
::core::clone::Clone::clone(&(*__self_0_7)),
last_archetypes_generation:
::core::clone::Clone::clone(&(*__self_0_8)),},
}
}
}
impl Default for ExecutorStage {
fn default() -> Self {
let (sender, receiver) = crossbeam_channel::unbounded();
Self{system_dependents: Default::default(),
system_dependencies: Default::default(),
thread_local_system_indices: Default::default(),
next_thread_local_index: 0,
finished_systems: Default::default(),
running_systems: Default::default(),
sender,
receiver,
last_archetypes_generation:
ArchetypesGeneration(u64::MAX),}
}
}
enum RunReadyResult { Ok, ThreadLocalReady(usize), }
enum RunReadyType { Range(Range<usize>), Dependents(usize), }
impl ExecutorStage {
pub fn prepare_to_next_thread_local(&mut self, world: &World,
systems:
&[Arc<Mutex<Box<dyn System>>>],
schedule_changed: bool) {
let (prepare_system_start_index, last_thread_local_index) =
if self.next_thread_local_index == 0 {
(0, None)
} else {
(self.thread_local_system_indices[self.next_thread_local_index
- 1] + 1,
Some(self.thread_local_system_indices[self.next_thread_local_index
- 1]))
};
let prepare_system_index_range =
if let Some(index) =
self.thread_local_system_indices.get(self.next_thread_local_index)
{
prepare_system_start_index..(*index + 1)
} else { prepare_system_start_index..systems.len() };
let archetypes_generation_changed =
self.last_archetypes_generation !=
world.archetypes_generation();
if schedule_changed || archetypes_generation_changed {
for system_index in prepare_system_index_range.clone() {
let mut system =
systems[system_index].lock().unwrap();
system.update_archetype_access(world);
}
let mut current_archetype_access =
ArchetypeAccess::default();
let mut current_resource_access = TypeAccess::default();
for system_index in prepare_system_index_range.clone() {
let system = systems[system_index].lock().unwrap();
let archetype_access = system.archetype_access();
match system.thread_local_execution() {
ThreadLocalExecution::NextFlush => {
let resource_access =
system.resource_access();
if current_archetype_access.is_compatible(archetype_access)
== false ||
current_resource_access.is_compatible(resource_access)
== false {
for earlier_system_index in
prepare_system_index_range.start..system_index
{
let earlier_system =
systems[earlier_system_index].lock().unwrap();
if true {
{
match (&earlier_system.thread_local_execution(),
&ThreadLocalExecution::NextFlush)
{
(left_val, right_val) => {
if !(*left_val ==
*right_val) {
{
::std::rt::begin_panic_fmt(&::core::fmt::Arguments::new_v1(&["assertion failed: `(left == right)`\n left: `",
"`,\n right: `",
"`"],
&match (&&*left_val,
&&*right_val)
{
(arg0,
arg1)
=>
[::core::fmt::ArgumentV1::new(arg0,
::core::fmt::Debug::fmt),
::core::fmt::ArgumentV1::new(arg1,
::core::fmt::Debug::fmt)],
}))
}
}
}
}
};
};
if earlier_system.archetype_access().is_compatible(archetype_access)
== false ||
earlier_system.resource_access().is_compatible(resource_access)
== false {
self.system_dependents[earlier_system_index].push(system_index);
self.system_dependencies[system_index].insert(earlier_system_index);
}
}
}
current_archetype_access.union(archetype_access);
current_resource_access.union(resource_access);
if let Some(last_thread_local_index) =
last_thread_local_index {
self.system_dependents[last_thread_local_index].push(system_index);
self.system_dependencies[system_index].insert(last_thread_local_index);
}
}
ThreadLocalExecution::Immediate => {
for earlier_system_index in
prepare_system_index_range.start..system_index
{
self.system_dependents[earlier_system_index].push(system_index);
self.system_dependencies[system_index].insert(earlier_system_index);
}
}
}
}
}
self.next_thread_local_index += 1;
}
fn run_ready_systems<'run>(&mut self,
systems:
&[Arc<Mutex<Box<dyn System>>>],
run_ready_type: RunReadyType,
scope: &ScopeFifo<'run>,
world: &'run World,
resources: &'run Resources)
-> RunReadyResult {
let mut all;
let mut dependents;
let system_index_iter: &mut dyn Iterator<Item = usize> =
match run_ready_type {
RunReadyType::Range(range) => {
all = range;
&mut all
}
RunReadyType::Dependents(system_index) => {
dependents =
self.system_dependents[system_index].iter().cloned();
&mut dependents
}
};
let mut systems_currently_running = false;
for system_index in system_index_iter {
if self.running_systems.contains(system_index) {
continue ;
}
if self.system_dependencies[system_index].is_subset(&self.finished_systems)
{
let system = systems[system_index].clone();
{
let system = system.lock().unwrap();
if let ThreadLocalExecution::Immediate =
system.thread_local_execution() {
if systems_currently_running {
continue ;
} else {
return RunReadyResult::ThreadLocalReady(system_index);
}
}
}
let sender = self.sender.clone();
self.running_systems.insert(system_index);
scope.spawn_fifo(move |_|
{
let mut system =
system.lock().unwrap();
system.run(world, resources);
sender.send(system_index).unwrap();
});
systems_currently_running = true;
}
}
RunReadyResult::Ok
}
pub fn run(&mut self, world: &mut World,
resources: &mut Resources,
systems: &[Arc<Mutex<Box<dyn System>>>],
schedule_changed: bool) {
if schedule_changed {
self.system_dependencies.clear();
self.system_dependencies.resize_with(systems.len(),
||
FixedBitSet::with_capacity(systems.len()));
self.thread_local_system_indices = Vec::new();
self.system_dependents.clear();
self.system_dependents.resize(systems.len(), Vec::new());
self.finished_systems.grow(systems.len());
self.running_systems.grow(systems.len());
for (system_index, system) in systems.iter().enumerate() {
let system = system.lock().unwrap();
if system.thread_local_execution() ==
ThreadLocalExecution::Immediate {
self.thread_local_system_indices.push(system_index);
}
}
}
self.next_thread_local_index = 0;
self.prepare_to_next_thread_local(world, systems,
schedule_changed);
self.finished_systems.clear();
self.running_systems.clear();
let mut run_ready_result = RunReadyResult::Ok;
let run_ready_system_index_range =
if let Some(index) =
self.thread_local_system_indices.get(0) {
0..(*index + 1)
} else { 0..systems.len() };
rayon::scope_fifo(|scope|
{
run_ready_result =
self.run_ready_systems(systems,
RunReadyType::Range(run_ready_system_index_range),
scope,
world,
resources);
});
loop {
if self.finished_systems.count_ones(..) == systems.len() {
break ;
}
if let RunReadyResult::ThreadLocalReady(thread_local_index)
= run_ready_result {
let mut system =
systems[thread_local_index].lock().unwrap();
self.running_systems.insert(thread_local_index);
system.run(world, resources);
system.run_thread_local(world, resources);
self.finished_systems.insert(thread_local_index);
self.sender.send(thread_local_index).unwrap();
self.prepare_to_next_thread_local(world, systems,
schedule_changed);
run_ready_result = RunReadyResult::Ok;
} else {
rayon::scope_fifo(|scope|
{
loop {
if self.finished_systems.count_ones(..)
== systems.len()
{
break ;
}
let finished_system =
self.receiver.recv().unwrap();
self.finished_systems.insert(finished_system);
run_ready_result =
self.run_ready_systems(systems,
RunReadyType::Dependents(finished_system),
scope,
world,
resources);
if let RunReadyResult::ThreadLocalReady(_)
=
run_ready_result
{
break ;
}
}
});
}
}
for system in systems.iter() {
let mut system = system.lock().unwrap();
match system.thread_local_execution() {
ThreadLocalExecution::NextFlush =>
system.run_thread_local(world, resources),
ThreadLocalExecution::Immediate => { }
}
}
self.last_archetypes_generation =
world.archetypes_generation();
}
}
}
mod schedule {
use crate::{resource::Resources,
system::{System, SystemId, ThreadLocalExecution}};
use bevy_hecs::World;
use std::{borrow::Cow, collections::{HashMap, HashSet},
sync::{Arc, Mutex}};
/// An ordered collection of stages, which each contain an ordered list of [System]s.
/// Schedules are essentially the "execution plan" for an App's systems.
/// They are run on a given [World] and [Resources] reference.
pub struct Schedule {
pub(crate) stages: HashMap<Cow<'static, str>,
Vec<Arc<Mutex<Box<dyn System>>>>>,
pub(crate) stage_order: Vec<Cow<'static, str>>,
pub(crate) system_ids: HashSet<SystemId>,
generation: usize,
last_initialize_generation: usize,
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::core::default::Default for Schedule {
#[inline]
fn default() -> Schedule {
Schedule{stages: ::core::default::Default::default(),
stage_order: ::core::default::Default::default(),
system_ids: ::core::default::Default::default(),
generation: ::core::default::Default::default(),
last_initialize_generation:
::core::default::Default::default(),}
}
}
impl Schedule {
pub fn add_stage(&mut self, stage: impl Into<Cow<'static, str>>) {
let stage: Cow<str> = stage.into();
if let Some(_) = self.stages.get(&stage) {
{
::std::rt::begin_panic_fmt(&::core::fmt::Arguments::new_v1(&["Stage already exists: "],
&match (&stage,)
{
(arg0,)
=>
[::core::fmt::ArgumentV1::new(arg0,
::core::fmt::Display::fmt)],
}))
};
} else {
self.stages.insert(stage.clone(), Vec::new());
self.stage_order.push(stage);
}
}
pub fn add_stage_after(&mut self,
target: impl Into<Cow<'static, str>>,
stage: impl Into<Cow<'static, str>>) {
let target: Cow<str> = target.into();
let stage: Cow<str> = stage.into();
if let Some(_) = self.stages.get(&stage) {
{
::std::rt::begin_panic_fmt(&::core::fmt::Arguments::new_v1(&["Stage already exists: "],
&match (&stage,)
{
(arg0,)
=>
[::core::fmt::ArgumentV1::new(arg0,
::core::fmt::Display::fmt)],
}))
};
}
let target_index =
self.stage_order.iter().enumerate().find(|(_i, stage)|
**stage ==
target).map(|(i,
_)|
i).unwrap_or_else(||
{
::std::rt::begin_panic_fmt(&::core::fmt::Arguments::new_v1(&["Target stage does not exist: "],
&match (&target,)
{
(arg0,)
=>
[::core::fmt::ArgumentV1::new(arg0,
::core::fmt::Display::fmt)],
}))
});
self.stages.insert(stage.clone(), Vec::new());
self.stage_order.insert(target_index + 1, stage);
}
pub fn add_stage_before(&mut self,
target: impl Into<Cow<'static, str>>,
stage: impl Into<Cow<'static, str>>) {
let target: Cow<str> = target.into();
let stage: Cow<str> = stage.into();
if let Some(_) = self.stages.get(&stage) {
{
::std::rt::begin_panic_fmt(&::core::fmt::Arguments::new_v1(&["Stage already exists: "],
&match (&stage,)
{
(arg0,)
=>
[::core::fmt::ArgumentV1::new(arg0,
::core::fmt::Display::fmt)],
}))
};
}
let target_index =
self.stage_order.iter().enumerate().find(|(_i, stage)|
**stage ==
target).map(|(i,
_)|
i).unwrap_or_else(||
{
::std::rt::begin_panic_fmt(&::core::fmt::Arguments::new_v1(&["Target stage does not exist: "],
&match (&target,)
{
(arg0,)
=>
[::core::fmt::ArgumentV1::new(arg0,
::core::fmt::Display::fmt)],
}))
});
self.stages.insert(stage.clone(), Vec::new());
self.stage_order.insert(target_index, stage);
}
pub fn add_system_to_stage(&mut self,
stage_name:
impl Into<Cow<'static, str>>,
system: Box<dyn System>) -> &mut Self {
let stage_name = stage_name.into();
let systems =
self.stages.get_mut(&stage_name).unwrap_or_else(||
{
::std::rt::begin_panic_fmt(&::core::fmt::Arguments::new_v1(&["Stage does not exist: "],
&match (&stage_name,)
{
(arg0,)
=>
[::core::fmt::ArgumentV1::new(arg0,
::core::fmt::Display::fmt)],
}))
});
if self.system_ids.contains(&system.id()) {
{
::std::rt::begin_panic_fmt(&::core::fmt::Arguments::new_v1(&["System with id ",
" (",
") already exists"],
&match (&system.id(),
&system.name())
{
(arg0,
arg1)
=>
[::core::fmt::ArgumentV1::new(arg0,
::core::fmt::Debug::fmt),
::core::fmt::ArgumentV1::new(arg1,
::core::fmt::Display::fmt)],
}))
};
}
self.system_ids.insert(system.id());
systems.push(Arc::new(Mutex::new(system)));
self.generation += 1;
self
}
pub fn add_system_to_stage_front(&mut self,
stage_name:
impl Into<Cow<'static, str>>,
system: Box<dyn System>)
-> &mut Self {
let stage_name = stage_name.into();
let systems =
self.stages.get_mut(&stage_name).unwrap_or_else(||
{
::std::rt::begin_panic_fmt(&::core::fmt::Arguments::new_v1(&["Stage does not exist: "],
&match (&stage_name,)
{
(arg0,)
=>
[::core::fmt::ArgumentV1::new(arg0,
::core::fmt::Display::fmt)],
}))
});
if self.system_ids.contains(&system.id()) {
{
::std::rt::begin_panic_fmt(&::core::fmt::Arguments::new_v1(&["System with id ",
" (",
") already exists"],
&match (&system.id(),
&system.name())
{
(arg0,
arg1)
=>
[::core::fmt::ArgumentV1::new(arg0,
::core::fmt::Debug::fmt),
::core::fmt::ArgumentV1::new(arg1,
::core::fmt::Display::fmt)],
}))
};
}
self.system_ids.insert(system.id());
systems.insert(0, Arc::new(Mutex::new(system)));
self.generation += 1;
self
}
pub fn run(&mut self, world: &mut World,
resources: &mut Resources) {
for stage_name in self.stage_order.iter() {
if let Some(stage_systems) =
self.stages.get_mut(stage_name) {
for system in stage_systems.iter_mut() {
let mut system = system.lock().unwrap();
system.update_archetype_access(world);
match system.thread_local_execution() {
ThreadLocalExecution::NextFlush =>
system.run(world, resources),
ThreadLocalExecution::Immediate => {
system.run(world, resources);
system.run_thread_local(world, resources);
}
}
}
for system in stage_systems.iter_mut() {
let mut system = system.lock().unwrap();
match system.thread_local_execution() {
ThreadLocalExecution::NextFlush => {
system.run_thread_local(world, resources)
}
ThreadLocalExecution::Immediate => { }
}
}
}
}
world.clear_trackers();
}
pub fn initialize(&mut self, resources: &mut Resources) {
if self.last_initialize_generation == self.generation {
return;
}
for stage in self.stages.values_mut() {
for system in stage.iter_mut() {
let mut system = system.lock().unwrap();
system.initialize(resources);
}
}
self.last_initialize_generation = self.generation;
}
pub fn generation(&self) -> usize { self.generation }
}
}
pub use parallel_executor::*;
pub use schedule::*;
}
mod system {
mod commands {
use super::SystemId;
use crate::resource::{Resource, Resources};
use bevy_hecs::{Bundle, Component, DynamicBundle, Entity, World};
use std::sync::{Arc, Mutex};
/// A queued command to mutate the current [World] or [Resources]
pub enum Command {
WriteWorld(Box<dyn WorldWriter>),
WriteResources(Box<dyn ResourcesWriter>),
}
/// A [World] mutation
pub trait WorldWriter: Send + Sync {
fn write(self: Box<Self>, world: &mut World);
}
pub(crate) struct Spawn<T> where T: DynamicBundle + Send + Sync +
'static {
components: T,
}
impl <T> WorldWriter for Spawn<T> where T: DynamicBundle + Send +
Sync + 'static {
fn write(self: Box<Self>, world: &mut World) {
world.spawn(self.components);
}
}
pub(crate) struct SpawnAsEntity<T> where T: DynamicBundle + Send +
Sync + 'static {
entity: Entity,
components: T,
}
impl <T> WorldWriter for SpawnAsEntity<T> where T: DynamicBundle +
Send + Sync + 'static {
fn write(self: Box<Self>, world: &mut World) {
world.spawn_as_entity(self.entity, self.components);
}
}
pub(crate) struct SpawnBatch<I> where I: IntoIterator,
I::Item: Bundle {
components_iter: I,
}
impl <I> WorldWriter for SpawnBatch<I> where I: IntoIterator + Send +
Sync, I::Item: Bundle {
fn write(self: Box<Self>, world: &mut World) {
world.spawn_batch(self.components_iter);
}
}
pub(crate) struct Despawn {
entity: Entity,
}
impl WorldWriter for Despawn {
fn write(self: Box<Self>, world: &mut World) {
world.despawn(self.entity).unwrap();
}
}
pub struct Insert<T> where T: DynamicBundle + Send + Sync + 'static {
entity: Entity,
components: T,
}
impl <T> WorldWriter for Insert<T> where T: DynamicBundle + Send +
Sync + 'static {
fn write(self: Box<Self>, world: &mut World) {
world.insert(self.entity, self.components).unwrap();
}
}
pub(crate) struct InsertOne<T> where T: Component {
entity: Entity,
component: T,
}
impl <T> WorldWriter for InsertOne<T> where T: Component {
fn write(self: Box<Self>, world: &mut World) {
world.insert(self.entity, (self.component,)).unwrap();
}
}
pub trait ResourcesWriter: Send + Sync {
fn write(self: Box<Self>, resources: &mut Resources);
}
pub struct InsertResource<T: Resource> {
resource: T,
}
impl <T: Resource> ResourcesWriter for InsertResource<T> {
fn write(self: Box<Self>, resources: &mut Resources) {
resources.insert(self.resource);
}
}
pub(crate) struct InsertLocalResource<T: Resource> {
resource: T,
system_id: SystemId,
}
impl <T: Resource> ResourcesWriter for InsertLocalResource<T> {
fn write(self: Box<Self>, resources: &mut Resources) {
resources.insert_local(self.system_id, self.resource);
}
}
pub struct CommandsInternal {
pub commands: Vec<Command>,
pub current_entity: Option<Entity>,
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::core::default::Default for CommandsInternal {
#[inline]
fn default() -> CommandsInternal {
CommandsInternal{commands:
::core::default::Default::default(),
current_entity:
::core::default::Default::default(),}
}
}
impl CommandsInternal {
pub fn spawn(&mut self,
components:
impl DynamicBundle + Send + Sync + 'static)
-> &mut Self {
self.spawn_as_entity(Entity::new(), components)
}
pub fn spawn_as_entity(&mut self, entity: Entity,
components:
impl DynamicBundle + Send + Sync +
'static) -> &mut Self {
self.current_entity = Some(entity);
self.commands.push(Command::WriteWorld(Box::new(SpawnAsEntity{entity,
components,})));
self
}
pub fn with_bundle(&mut self,
components:
impl DynamicBundle + Send + Sync + 'static)
-> &mut Self {
let current_entity =
self.current_entity.expect("Cannot add components because the 'current entity' is not set. You should spawn an entity first.");
self.commands.push(Command::WriteWorld(Box::new(Insert{entity:
current_entity,
components,})));
self
}
pub fn with(&mut self, component: impl Component) -> &mut Self {
let current_entity =
self.current_entity.expect("Cannot add component because the 'current entity' is not set. You should spawn an entity first.");
self.commands.push(Command::WriteWorld(Box::new(InsertOne{entity:
current_entity,
component,})));
self
}
pub fn write_world<W: WorldWriter +
'static>(&mut self, world_writer: W)
-> &mut Self {
self.commands.push(Command::WriteWorld(Box::new(world_writer)));
self
}
pub fn write_resources<W: ResourcesWriter +
'static>(&mut self, resources_writer: W)
-> &mut Self {
self.commands.push(Command::WriteResources(Box::new(resources_writer)));
self
}
}
/// A queue of [Command]s to run on the current [World] and [Resources]
pub struct Commands {
pub commands: Arc<Mutex<CommandsInternal>>,
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::core::default::Default for Commands {
#[inline]
fn default() -> Commands {
Commands{commands: ::core::default::Default::default(),}
}
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::core::clone::Clone for Commands {
#[inline]
fn clone(&self) -> Commands {
match *self {
Commands { commands: ref __self_0_0 } =>
Commands{commands:
::core::clone::Clone::clone(&(*__self_0_0)),},
}
}
}
impl Commands {
pub fn spawn(&mut self,
components:
impl DynamicBundle + Send + Sync + 'static)
-> &mut Self {
self.spawn_as_entity(Entity::new(), components)
}
pub fn spawn_as_entity(&mut self, entity: Entity,
components:
impl DynamicBundle + Send + Sync +
'static) -> &mut Self {
{
let mut commands = self.commands.lock().unwrap();
commands.spawn_as_entity(entity, components);
}
self
}
pub fn spawn_batch<I>(&mut self, components_iter: I) -> &mut Self
where I: IntoIterator + Send + Sync + 'static, I::Item: Bundle {
self.write_world(SpawnBatch{components_iter,})
}
/// Despawns only the specified entity, ignoring any other consideration.
pub fn despawn(&mut self, entity: Entity) -> &mut Self {
self.write_world(Despawn{entity,})
}
pub fn with(&mut self, component: impl Component) -> &mut Self {
{
let mut commands = self.commands.lock().unwrap();
commands.with(component);
}
self
}
pub fn with_bundle(&mut self,
components:
impl DynamicBundle + Send + Sync + 'static)
-> &mut Self {
{
let mut commands = self.commands.lock().unwrap();
commands.with_bundle(components);
}
self
}
pub fn insert(&mut self, entity: Entity,
components:
impl DynamicBundle + Send + Sync + 'static)
-> &mut Self {
self.write_world(Insert{entity, components,})
}
pub fn insert_one(&mut self, entity: Entity,
component: impl Component) -> &mut Self {
self.write_world(InsertOne{entity, component,})
}
pub fn insert_resource<T: Resource>(&mut self, resource: T)
-> &mut Self {
self.write_resources(InsertResource{resource,})
}
pub fn insert_local_resource<T: Resource>(&mut self,
system_id: SystemId,
resource: T)
-> &mut Self {
self.write_resources(InsertLocalResource{system_id,
resource,})
}
pub fn write_world<W: WorldWriter +
'static>(&mut self, world_writer: W)
-> &mut Self {
self.commands.lock().unwrap().write_world(world_writer);
self
}
pub fn write_resources<W: ResourcesWriter +
'static>(&mut self, resources_writer: W)
-> &mut Self {
self.commands.lock().unwrap().write_resources(resources_writer);
self
}
pub fn apply(&self, world: &mut World,
resources: &mut Resources) {
let mut commands = self.commands.lock().unwrap();
for command in commands.commands.drain(..) {
match command {
Command::WriteWorld(writer) => {
writer.write(world);
}
Command::WriteResources(writer) =>
writer.write(resources),
}
}
}
pub fn current_entity(&self) -> Option<Entity> {
let commands = self.commands.lock().unwrap();
commands.current_entity
}
pub fn for_current_entity(&mut self, mut f: impl FnMut(Entity))
-> &mut Self {
{
let commands = self.commands.lock().unwrap();
let current_entity =
commands.current_entity.expect("The 'current entity' is not set. You should spawn an entity first.");
f(current_entity);
}
self
}
}
}
mod into_system {
pub use super::Query;
use super::TypeAccess;
use crate::{resource::{FetchResource, ResourceQuery, Resources,
UnsafeClone},
system::{ArchetypeAccess, Commands, System, SystemId,
ThreadLocalExecution}};
use bevy_hecs::{Fetch, Query as HecsQuery, World};
use std::borrow::Cow;
pub(crate) struct SystemFn<State, F, ThreadLocalF, Init,
SetArchetypeAccess> where
F: FnMut(&World, &Resources, &ArchetypeAccess,
&mut State) + Send + Sync,
ThreadLocalF: FnMut(&mut World, &mut Resources,
&mut State) + Send + Sync,
Init: FnMut(&mut Resources) + Send + Sync,
SetArchetypeAccess: FnMut(&World,
&mut ArchetypeAccess,
&mut State) + Send + Sync,
State: Send + Sync {
pub state: State,
pub func: F,
pub thread_local_func: ThreadLocalF,
pub init_func: Init,
pub thread_local_execution: ThreadLocalExecution,
pub resource_access: TypeAccess,
pub name: Cow<'static, str>,
pub id: SystemId,
pub archetype_access: ArchetypeAccess,
pub set_archetype_access: SetArchetypeAccess,
}
impl <State, F, ThreadLocalF, Init, SetArchetypeAccess> System for
SystemFn<State, F, ThreadLocalF, Init, SetArchetypeAccess> where
F: FnMut(&World, &Resources, &ArchetypeAccess, &mut State) + Send +
Sync, ThreadLocalF: FnMut(&mut World, &mut Resources, &mut State) +
Send + Sync, Init: FnMut(&mut Resources) + Send + Sync,
SetArchetypeAccess: FnMut(&World, &mut ArchetypeAccess, &mut State) +
Send + Sync, State: Send + Sync {
fn name(&self) -> Cow<'static, str> { self.name.clone() }
fn update_archetype_access(&mut self, world: &World) {
(self.set_archetype_access)(world, &mut self.archetype_access,
&mut self.state);
}
fn archetype_access(&self) -> &ArchetypeAccess {
&self.archetype_access
}
fn resource_access(&self) -> &TypeAccess { &self.resource_access }
fn thread_local_execution(&self) -> ThreadLocalExecution {
self.thread_local_execution
}
#[inline]
fn run(&mut self, world: &World, resources: &Resources) {
(self.func)(world, resources, &self.archetype_access,
&mut self.state);
}
fn run_thread_local(&mut self, world: &mut World,
resources: &mut Resources) {
(self.thread_local_func)(world, resources, &mut self.state);
}
fn initialize(&mut self, resources: &mut Resources) {
(self.init_func)(resources);
}
fn id(&self) -> SystemId { self.id }
}
/// Converts `Self` into a For-Each system
pub trait IntoForEachSystem<CommandBuffer, R, C> {
fn system(self)
-> Box<dyn System>;
}
macro_rules! impl_into_foreach_system {
(($ ($ commands : ident) *), ($ ($ resource : ident), *),
($ ($ component : ident), *)) =>
{
impl < Func, $ ($ resource,) * $ ($ component,) * >
IntoForEachSystem < ($ ($ commands,) *), ($ ($ resource,) *),
($ ($ component,) *) > for Func where Func :
FnMut($ ($ commands,) * $ ($ resource,) * $ ($ component,) *)
+
FnMut($ ($ commands,) * $
(<< $ resource as ResourceQuery > :: Fetch as
FetchResource > :: Item,) * $
(<< $ component as HecsQuery > :: Fetch as Fetch > ::
Item,) *) + Send + Sync + 'static, $
($ component : HecsQuery,) * $ ($ resource : ResourceQuery,) *
{
# [allow(non_snake_case)] # [allow(unused_variables)] #
[allow(unused_unsafe)] fn system(mut self) -> Box < dyn
System >
{
let id = SystemId :: new() ; Box ::
new(SystemFn
{
state : Commands :: default(),
thread_local_execution : ThreadLocalExecution
:: NextFlush, name : core :: any :: type_name
:: < Self > () . into(), id, func : move |
world, resources, _archetype_access, state |
{
<< ($ ($ resource,) *) as ResourceQuery >
:: Fetch as FetchResource > ::
borrow(& resources) ;
{
let($ ($ resource,) *) = resources .
query_system :: < ($ ($ resource,) *)
> (id) ; for($ ($ component,) *) in
world . query :: <
($ ($ component,) *) > () . iter()
{
fn_call !
(self, ($ ($ commands, state) *),
($ ($ resource), *),
($ ($ component), *))
}
} << ($ ($ resource,) *) as ResourceQuery
> :: Fetch as FetchResource > ::
release(& resources) ;
}, thread_local_func : move | world,
resources, state |
{ state . apply(world, resources) ; },
init_func : move | resources |
{
< ($ ($ resource,) *) > ::
initialize(resources, Some(id)) ;
}, resource_access : << ($ ($ resource,) *) as
ResourceQuery > :: Fetch as FetchResource > ::
access(), archetype_access : ArchetypeAccess
:: default(), set_archetype_access : | world,
archetype_access, _state |
{
archetype_access . clear() ;
archetype_access . set_access_for_query ::
< ($ ($ component,) *) > (world) ;
},
})
}
}
} ;
}
struct QuerySystemState {
archetype_accesses: Vec<ArchetypeAccess>,
commands: Commands,
}
/// Converts `Self` into a Query System
pub trait IntoQuerySystem<Commands, R, Q> {
fn system(self)
-> Box<dyn System>;
}
macro_rules! impl_into_query_system {
(($ ($ commands : ident) *), ($ ($ resource : ident), *),
($ ($ query : ident), *)) =>
{
impl < Func, $ ($ resource,) * $ ($ query,) * >
IntoQuerySystem < ($ ($ commands,) *), ($ ($ resource,) *),
($ ($ query,) *) > for Func where Func :
FnMut($ ($ commands,) * $ ($ resource,) * $
(Query < $ query >,) *) +
FnMut($ ($ commands,) * $
(<< $ resource as ResourceQuery > :: Fetch as
FetchResource > :: Item,) * $ (Query < $ query >,) *) +
Send + Sync + 'static, $ ($ query : HecsQuery,) * $
($ resource : ResourceQuery,) *
{
# [allow(non_snake_case)] # [allow(unused_variables)] #
[allow(unused_unsafe)] # [allow(unused_assignments)] #
[allow(unused_mut)] fn system(mut self) -> Box < dyn
System >
{
let id = SystemId :: new() ; $
(let $ query = ArchetypeAccess :: default() ;) * Box
::
new(SystemFn
{
state : QuerySystemState
{
archetype_accesses : vec !
[$ ($ query,) *], commands : Commands ::
default(),
}, thread_local_execution :
ThreadLocalExecution :: NextFlush, id, name :
core :: any :: type_name :: < Self > () .
into(), func : move | world, resources,
archetype_access, state |
{
<< ($ ($ resource,) *) as ResourceQuery >
:: Fetch as FetchResource > ::
borrow(& resources) ;
{
let($ ($ resource,) *) = resources .
query_system :: < ($ ($ resource,) *)
> (id) ; let mut i = 0 ; $
(let $ query = Query :: < $ query > ::
new(world, & state .
archetype_accesses [i]) ; i += 1
;) * let commands = & state .
commands ; fn_call !
(self, ($ ($ commands, commands) *),
($ ($ resource), *),
($ ($ query), *))
} << ($ ($ resource,) *) as ResourceQuery
> :: Fetch as FetchResource > ::
release(& resources) ;
}, thread_local_func : move | world,
resources, state |
{
state . commands . apply(world, resources)
;
}, init_func : move | resources |
{
< ($ ($ resource,) *) > ::
initialize(resources, Some(id)) ;
}, resource_access : << ($ ($ resource,) *) as
ResourceQuery > :: Fetch as FetchResource > ::
access(), archetype_access : ArchetypeAccess
:: default(), set_archetype_access : | world,
archetype_access, state |
{
archetype_access . clear() ; let mut i = 0
; let mut access : & mut ArchetypeAccess ;
$
(access = & mut state . archetype_accesses
[i] ; access . clear() ; access .
set_access_for_query :: < $ query >
(world) ; archetype_access .
union(access) ; i += 1 ;) *
},
})
}
}
} ;
}
macro_rules! fn_call {
($ self : ident,
($ ($ commands : ident, $ commands_var : ident) *),
($ ($ resource : ident), *), ($ ($ a : ident), *)) =>
{
unsafe
{
$
self($ ($ commands_var . clone(),) * $
($ resource . unsafe_clone(),) * $ ($ a,) *)
}
} ;
($ self : ident, (), ($ ($ resource : ident), *),
($ ($ a : ident), *)) =>
{
unsafe
{ $ self($ ($ resource . unsafe_clone(),) * $ ($ a,) *) }
} ;
}
macro_rules! impl_into_query_systems {
(($ ($ resource : ident,) *), ($ ($ query : ident), *)) =>
{
# [rustfmt :: skip] impl_into_query_system !
((), ($ ($ resource), *), ($ ($ query), *)) ; #
[rustfmt :: skip] impl_into_query_system !
((Commands), ($ ($ resource), *), ($ ($ query), *)) ;
}
}
macro_rules! impl_into_foreach_systems {
(($ ($ resource : ident,) *), ($ ($ component : ident), *)) =>
{
# [rustfmt :: skip] impl_into_foreach_system !
((), ($ ($ resource), *), ($ ($ component), *)) ; #
[rustfmt :: skip] impl_into_foreach_system !
((Commands), ($ ($ resource), *), ($ ($ component), *)) ;
}
}
macro_rules! impl_into_systems {
($ ($ resource : ident), *) =>
{
# [rustfmt :: skip] impl_into_foreach_systems !
(($ ($ resource,) *), (A)) ; # [rustfmt :: skip]
impl_into_foreach_systems ! (($ ($ resource,) *), (A, B)) ; #
[rustfmt :: skip] impl_into_foreach_systems !
(($ ($ resource,) *), (A, B, C)) ; # [rustfmt :: skip]
impl_into_foreach_systems !
(($ ($ resource,) *), (A, B, C, D)) ; # [rustfmt :: skip]
impl_into_foreach_systems !
(($ ($ resource,) *), (A, B, C, D, E)) ; # [rustfmt :: skip]
impl_into_foreach_systems !
(($ ($ resource,) *), (A, B, C, D, E, F)) ; #
[rustfmt :: skip] impl_into_foreach_systems !
(($ ($ resource,) *), (A, B, C, D, E, F, G)) ; #
[rustfmt :: skip] impl_into_foreach_systems !
(($ ($ resource,) *), (A, B, C, D, E, F, G, H)) ; #
[rustfmt :: skip] impl_into_query_systems !
(($ ($ resource,) *), ()) ; # [rustfmt :: skip]
impl_into_query_systems ! (($ ($ resource,) *), (A)) ; #
[rustfmt :: skip] impl_into_query_systems !
(($ ($ resource,) *), (A, B)) ; # [rustfmt :: skip]
impl_into_query_systems ! (($ ($ resource,) *), (A, B, C)) ; #
[rustfmt :: skip] impl_into_query_systems !
(($ ($ resource,) *), (A, B, C, D)) ; # [rustfmt :: skip]
impl_into_query_systems !
(($ ($ resource,) *), (A, B, C, D, E)) ; # [rustfmt :: skip]
impl_into_query_systems !
(($ ($ resource,) *), (A, B, C, D, E, F)) ;
} ;
}
impl <Func, A> IntoForEachSystem<(), (), (A,)> for Func where
Func: FnMut(A) + FnMut(<<A as HecsQuery>::Fetch as Fetch>::Item) +
Send + Sync + 'static, A: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A,) in
world.query::<(A,)>().iter()
{
unsafe { self(A) }
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,)>(world);
},})
}
}
impl <Func, A> IntoForEachSystem<(Commands,), (), (A,)> for Func where
Func: FnMut(Commands, A) +
FnMut(Commands, <<A as HecsQuery>::Fetch as Fetch>::Item) + Send +
Sync + 'static, A: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A,) in
world.query::<(A,)>().iter()
{
unsafe {
self(state.clone(),
A)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,)>(world);
},})
}
}
impl <Func, A, B> IntoForEachSystem<(), (), (A, B)> for Func where
Func: FnMut(A, B) +
FnMut(<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B) in
world.query::<(A,
B)>().iter()
{
unsafe { self(A, B) }
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B)>(world);
},})
}
}
impl <Func, A, B> IntoForEachSystem<(Commands,), (), (A, B)> for Func
where Func: FnMut(Commands, A, B) +
FnMut(Commands, <<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B) in
world.query::<(A,
B)>().iter()
{
unsafe {
self(state.clone(),
A, B)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B)>(world);
},})
}
}
impl <Func, A, B, C> IntoForEachSystem<(), (), (A, B, C)> for Func
where Func: FnMut(A, B, C) +
FnMut(<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C) in
world.query::<(A, B,
C)>().iter()
{
unsafe { self(A, B, C) }
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C)>(world);
},})
}
}
impl <Func, A, B, C> IntoForEachSystem<(Commands,), (), (A, B, C)> for
Func where Func: FnMut(Commands, A, B, C) +
FnMut(Commands, <<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C) in
world.query::<(A, B,
C)>().iter()
{
unsafe {
self(state.clone(),
A, B, C)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C)>(world);
},})
}
}
impl <Func, A, B, C, D> IntoForEachSystem<(), (), (A, B, C, D)> for
Func where Func: FnMut(A, B, C, D) +
FnMut(<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C, D) in
world.query::<(A, B, C,
D)>().iter()
{
unsafe {
self(A, B, C, D)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D)>(world);
},})
}
}
impl <Func, A, B, C, D>
IntoForEachSystem<(Commands,), (), (A, B, C, D)> for Func where
Func: FnMut(Commands, A, B, C, D) +
FnMut(Commands, <<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C, D) in
world.query::<(A, B, C,
D)>().iter()
{
unsafe {
self(state.clone(),
A, B, C, D)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D)>(world);
},})
}
}
impl <Func, A, B, C, D, E> IntoForEachSystem<(), (), (A, B, C, D, E)>
for Func where Func: FnMut(A, B, C, D, E) +
FnMut(<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C, D, E) in
world.query::<(A, B, C,
D,
E)>().iter()
{
unsafe {
self(A, B, C, D, E)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E)>(world);
},})
}
}
impl <Func, A, B, C, D, E>
IntoForEachSystem<(Commands,), (), (A, B, C, D, E)> for Func where
Func: FnMut(Commands, A, B, C, D, E) +
FnMut(Commands, <<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C, D, E) in
world.query::<(A, B, C,
D,
E)>().iter()
{
unsafe {
self(state.clone(),
A, B, C, D, E)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E)>(world);
},})
}
}
impl <Func, A, B, C, D, E, F>
IntoForEachSystem<(), (), (A, B, C, D, E, F)> for Func where
Func: FnMut(A, B, C, D, E, F) +
FnMut(<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C, D, E, F) in
world.query::<(A, B, C,
D, E,
F)>().iter()
{
unsafe {
self(A, B, C, D, E,
F)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F)>(world);
},})
}
}
impl <Func, A, B, C, D, E, F>
IntoForEachSystem<(Commands,), (), (A, B, C, D, E, F)> for Func where
Func: FnMut(Commands, A, B, C, D, E, F) +
FnMut(Commands, <<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C, D, E, F) in
world.query::<(A, B, C,
D, E,
F)>().iter()
{
unsafe {
self(state.clone(),
A, B, C, D, E,
F)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F)>(world);
},})
}
}
impl <Func, A, B, C, D, E, F, G>
IntoForEachSystem<(), (), (A, B, C, D, E, F, G)> for Func where
Func: FnMut(A, B, C, D, E, F, G) +
FnMut(<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C, D, E, F, G) in
world.query::<(A, B, C,
D, E, F,
G)>().iter()
{
unsafe {
self(A, B, C, D, E,
F, G)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G)>(world);
},})
}
}
impl <Func, A, B, C, D, E, F, G>
IntoForEachSystem<(Commands,), (), (A, B, C, D, E, F, G)> for Func
where Func: FnMut(Commands, A, B, C, D, E, F, G) +
FnMut(Commands, <<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C, D, E, F, G) in
world.query::<(A, B, C,
D, E, F,
G)>().iter()
{
unsafe {
self(state.clone(),
A, B, C, D, E,
F, G)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G)>(world);
},})
}
}
impl <Func, A, B, C, D, E, F, G, H>
IntoForEachSystem<(), (), (A, B, C, D, E, F, G, H)> for Func where
Func: FnMut(A, B, C, D, E, F, G, H) +
FnMut(<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item,
<<H as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, H: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C, D, E, F, G, H)
in
world.query::<(A, B, C,
D, E, F,
G,
H)>().iter()
{
unsafe {
self(A, B, C, D, E,
F, G, H)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G,
H)>(world);
},})
}
}
impl <Func, A, B, C, D, E, F, G, H>
IntoForEachSystem<(Commands,), (), (A, B, C, D, E, F, G, H)> for Func
where Func: FnMut(Commands, A, B, C, D, E, F, G, H) +
FnMut(Commands, <<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item,
<<H as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, H: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
for (A, B, C, D, E, F, G, H)
in
world.query::<(A, B, C,
D, E, F,
G,
H)>().iter()
{
unsafe {
self(state.clone(),
A, B, C, D, E,
F, G, H)
}
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G,
H)>(world);
},})
}
}
impl <Func> IntoQuerySystem<(), (), ()> for Func where Func: FnMut() +
FnMut() + Send + Sync + 'static {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let commands =
&state.commands;
unsafe { self() }
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
},})
}
}
impl <Func> IntoQuerySystem<(Commands,), (), ()> for Func where
Func: FnMut(Commands) + FnMut(Commands) + Send + Sync + 'static {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let commands =
&state.commands;
unsafe {
self(commands.clone())
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
},})
}
}
impl <Func, A> IntoQuerySystem<(), (), (A,)> for Func where
Func: FnMut(Query<A>) + FnMut(Query<A>) + Send + Sync + 'static,
A: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe { self(A) }
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, A> IntoQuerySystem<(Commands,), (), (A,)> for Func where
Func: FnMut(Commands, Query<A>) + FnMut(Commands, Query<A>) + Send +
Sync + 'static, A: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
A)
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, A, B> IntoQuerySystem<(), (), (A, B)> for Func where
Func: FnMut(Query<A>, Query<B>) + FnMut(Query<A>, Query<B>) + Send +
Sync + 'static, A: HecsQuery, B: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe { self(A, B) }
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, A, B> IntoQuerySystem<(Commands,), (), (A, B)> for Func
where Func: FnMut(Commands, Query<A>, Query<B>) +
FnMut(Commands, Query<A>, Query<B>) + Send + Sync + 'static,
A: HecsQuery, B: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
A, B)
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, A, B, C> IntoQuerySystem<(), (), (A, B, C)> for Func where
Func: FnMut(Query<A>, Query<B>, Query<C>) +
FnMut(Query<A>, Query<B>, Query<C>) + Send + Sync + 'static,
A: HecsQuery, B: HecsQuery, C: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe { self(A, B, C) }
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, A, B, C> IntoQuerySystem<(Commands,), (), (A, B, C)> for
Func where Func: FnMut(Commands, Query<A>, Query<B>, Query<C>) +
FnMut(Commands, Query<A>, Query<B>, Query<C>) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
A, B, C)
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, A, B, C, D> IntoQuerySystem<(), (), (A, B, C, D)> for Func
where Func: FnMut(Query<A>, Query<B>, Query<C>, Query<D>) +
FnMut(Query<A>, Query<B>, Query<C>, Query<D>) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe { self(A, B, C, D) }
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, A, B, C, D> IntoQuerySystem<(Commands,), (), (A, B, C, D)>
for Func where
Func: FnMut(Commands, Query<A>, Query<B>, Query<C>, Query<D>) +
FnMut(Commands, Query<A>, Query<B>, Query<C>, Query<D>) + Send +
Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
A, B, C, D)
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, A, B, C, D, E> IntoQuerySystem<(), (), (A, B, C, D, E)>
for Func where
Func: FnMut(Query<A>, Query<B>, Query<C>, Query<D>, Query<E>) +
FnMut(Query<A>, Query<B>, Query<C>, Query<D>, Query<E>) + Send +
Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(A, B, C, D, E)
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, A, B, C, D, E>
IntoQuerySystem<(Commands,), (), (A, B, C, D, E)> for Func where
Func: FnMut(Commands, Query<A>, Query<B>, Query<C>, Query<D>,
Query<E>) +
FnMut(Commands, Query<A>, Query<B>, Query<C>, Query<D>, Query<E>) +
Send + Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
A, B, C, D, E)
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, A, B, C, D, E, F>
IntoQuerySystem<(), (), (A, B, C, D, E, F)> for Func where
Func: FnMut(Query<A>, Query<B>, Query<C>, Query<D>, Query<E>,
Query<F>) +
FnMut(Query<A>, Query<B>, Query<C>, Query<D>, Query<E>, Query<F>) +
Send + Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, F: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
let F = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E,
F]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let F =
Query::<F>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(A, B, C, D, E, F)
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<F>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, A, B, C, D, E, F>
IntoQuerySystem<(Commands,), (), (A, B, C, D, E, F)> for Func where
Func: FnMut(Commands, Query<A>, Query<B>, Query<C>, Query<D>,
Query<E>, Query<F>) +
FnMut(Commands, Query<A>, Query<B>, Query<C>, Query<D>, Query<E>,
Query<F>) + Send + Sync + 'static, A: HecsQuery, B: HecsQuery,
C: HecsQuery, D: HecsQuery, E: HecsQuery, F: HecsQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
let F = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E,
F]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<() as ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let () =
resources.query_system::<()>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let F =
Query::<F>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
A, B, C, D, E, F)
}
}
<<() as ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<()>::initialize(resources,
Some(id));
},
resource_access:
<<() as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<F>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A> IntoForEachSystem<(), (Ra,), (A,)> for Func where
Func: FnMut(Ra, A) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A,) in
world.query::<(A,)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
A)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,)>(world);
},})
}
}
impl <Func, Ra, A> IntoForEachSystem<(Commands,), (Ra,), (A,)> for
Func where Func: FnMut(Commands, Ra, A) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A,) in
world.query::<(A,)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
A)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,)>(world);
},})
}
}
impl <Func, Ra, A, B> IntoForEachSystem<(), (Ra,), (A, B)> for Func
where Func: FnMut(Ra, A, B) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B) in
world.query::<(A,
B)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
A, B)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B)>(world);
},})
}
}
impl <Func, Ra, A, B> IntoForEachSystem<(Commands,), (Ra,), (A, B)>
for Func where Func: FnMut(Commands, Ra, A, B) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B) in
world.query::<(A,
B)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
A, B)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B)>(world);
},})
}
}
impl <Func, Ra, A, B, C> IntoForEachSystem<(), (Ra,), (A, B, C)> for
Func where Func: FnMut(Ra, A, B, C) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery
{
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C) in
world.query::<(A, B,
C)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
A, B, C)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C)>(world);
},})
}
}
impl <Func, Ra, A, B, C>
IntoForEachSystem<(Commands,), (Ra,), (A, B, C)> for Func where
Func: FnMut(Commands, Ra, A, B, C) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery
{
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C) in
world.query::<(A, B,
C)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
A, B, C)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C)>(world);
},})
}
}
impl <Func, Ra, A, B, C, D> IntoForEachSystem<(), (Ra,), (A, B, C, D)>
for Func where Func: FnMut(Ra, A, B, C, D) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C, D) in
world.query::<(A, B, C,
D)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
A, B, C, D)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D)>(world);
},})
}
}
impl <Func, Ra, A, B, C, D>
IntoForEachSystem<(Commands,), (Ra,), (A, B, C, D)> for Func where
Func: FnMut(Commands, Ra, A, B, C, D) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C, D) in
world.query::<(A, B, C,
D)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
A, B, C, D)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D)>(world);
},})
}
}
impl <Func, Ra, A, B, C, D, E>
IntoForEachSystem<(), (Ra,), (A, B, C, D, E)> for Func where
Func: FnMut(Ra, A, B, C, D, E) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C, D, E) in
world.query::<(A, B, C,
D,
E)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
A, B, C, D, E)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E)>(world);
},})
}
}
impl <Func, Ra, A, B, C, D, E>
IntoForEachSystem<(Commands,), (Ra,), (A, B, C, D, E)> for Func where
Func: FnMut(Commands, Ra, A, B, C, D, E) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C, D, E) in
world.query::<(A, B, C,
D,
E)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
A, B, C, D, E)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E)>(world);
},})
}
}
impl <Func, Ra, A, B, C, D, E, F>
IntoForEachSystem<(), (Ra,), (A, B, C, D, E, F)> for Func where
Func: FnMut(Ra, A, B, C, D, E, F) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C, D, E, F) in
world.query::<(A, B, C,
D, E,
F)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
A, B, C, D, E,
F)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F)>(world);
},})
}
}
impl <Func, Ra, A, B, C, D, E, F>
IntoForEachSystem<(Commands,), (Ra,), (A, B, C, D, E, F)> for Func
where Func: FnMut(Commands, Ra, A, B, C, D, E, F) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C, D, E, F) in
world.query::<(A, B, C,
D, E,
F)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
A, B, C, D, E,
F)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F)>(world);
},})
}
}
impl <Func, Ra, A, B, C, D, E, F, G>
IntoForEachSystem<(), (Ra,), (A, B, C, D, E, F, G)> for Func where
Func: FnMut(Ra, A, B, C, D, E, F, G) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C, D, E, F, G) in
world.query::<(A, B, C,
D, E, F,
G)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
A, B, C, D, E,
F, G)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G)>(world);
},})
}
}
impl <Func, Ra, A, B, C, D, E, F, G>
IntoForEachSystem<(Commands,), (Ra,), (A, B, C, D, E, F, G)> for Func
where Func: FnMut(Commands, Ra, A, B, C, D, E, F, G) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C, D, E, F, G) in
world.query::<(A, B, C,
D, E, F,
G)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
A, B, C, D, E,
F, G)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G)>(world);
},})
}
}
impl <Func, Ra, A, B, C, D, E, F, G, H>
IntoForEachSystem<(), (Ra,), (A, B, C, D, E, F, G, H)> for Func where
Func: FnMut(Ra, A, B, C, D, E, F, G, H) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item,
<<H as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, H: HecsQuery,
Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C, D, E, F, G, H)
in
world.query::<(A, B, C,
D, E, F,
G,
H)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
A, B, C, D, E,
F, G, H)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G,
H)>(world);
},})
}
}
impl <Func, Ra, A, B, C, D, E, F, G, H>
IntoForEachSystem<(Commands,), (Ra,), (A, B, C, D, E, F, G, H)> for
Func where Func: FnMut(Commands, Ra, A, B, C, D, E, F, G, H) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item,
<<H as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, H: HecsQuery,
Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
for (A, B, C, D, E, F, G, H)
in
world.query::<(A, B, C,
D, E, F,
G,
H)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
A, B, C, D, E,
F, G, H)
}
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G,
H)>(world);
},})
}
}
impl <Func, Ra> IntoQuerySystem<(), (Ra,), ()> for Func where
Func: FnMut(Ra) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item) + Send +
Sync + 'static, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone())
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
},})
}
}
impl <Func, Ra> IntoQuerySystem<(Commands,), (Ra,), ()> for Func where
Func: FnMut(Commands, Ra) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item) + Send +
Sync + 'static, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone())
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
},})
}
}
impl <Func, Ra, A> IntoQuerySystem<(), (Ra,), (A,)> for Func where
Func: FnMut(Ra, Query<A>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>) + Send + Sync + 'static, A: HecsQuery,
Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
A)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A> IntoQuerySystem<(Commands,), (Ra,), (A,)> for Func
where Func: FnMut(Commands, Ra, Query<A>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>) + Send + Sync + 'static, A: HecsQuery,
Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
A)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A, B> IntoQuerySystem<(), (Ra,), (A, B)> for Func
where Func: FnMut(Ra, Query<A>, Query<B>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>) + Send + Sync + 'static, A: HecsQuery,
B: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
A, B)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A, B> IntoQuerySystem<(Commands,), (Ra,), (A, B)> for
Func where Func: FnMut(Commands, Ra, Query<A>, Query<B>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>) + Send + Sync + 'static, A: HecsQuery,
B: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
A, B)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A, B, C> IntoQuerySystem<(), (Ra,), (A, B, C)> for
Func where Func: FnMut(Ra, Query<A>, Query<B>, Query<C>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>) + Send + Sync + 'static,
A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
A, B, C)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A, B, C>
IntoQuerySystem<(Commands,), (Ra,), (A, B, C)> for Func where
Func: FnMut(Commands, Ra, Query<A>, Query<B>, Query<C>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>) + Send + Sync + 'static,
A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
A, B, C)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A, B, C, D> IntoQuerySystem<(), (Ra,), (A, B, C, D)>
for Func where
Func: FnMut(Ra, Query<A>, Query<B>, Query<C>, Query<D>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
A, B, C, D)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A, B, C, D>
IntoQuerySystem<(Commands,), (Ra,), (A, B, C, D)> for Func where
Func: FnMut(Commands, Ra, Query<A>, Query<B>, Query<C>, Query<D>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
A, B, C, D)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A, B, C, D, E>
IntoQuerySystem<(), (Ra,), (A, B, C, D, E)> for Func where
Func: FnMut(Ra, Query<A>, Query<B>, Query<C>, Query<D>, Query<E>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>) + Send +
Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
A, B, C, D, E)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A, B, C, D, E>
IntoQuerySystem<(Commands,), (Ra,), (A, B, C, D, E)> for Func where
Func: FnMut(Commands, Ra, Query<A>, Query<B>, Query<C>, Query<D>,
Query<E>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>) + Send +
Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
A, B, C, D, E)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A, B, C, D, E, F>
IntoQuerySystem<(), (Ra,), (A, B, C, D, E, F)> for Func where
Func: FnMut(Ra, Query<A>, Query<B>, Query<C>, Query<D>, Query<E>,
Query<F>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>, Query<F>) +
Send + Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, F: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
let F = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E,
F]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let F =
Query::<F>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
A, B, C, D, E, F)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<F>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, A, B, C, D, E, F>
IntoQuerySystem<(Commands,), (Ra,), (A, B, C, D, E, F)> for Func
where
Func: FnMut(Commands, Ra, Query<A>, Query<B>, Query<C>, Query<D>,
Query<E>, Query<F>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>, Query<F>) +
Send + Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, F: HecsQuery, Ra: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
let F = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E,
F]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::borrow(&resources);
{
let (Ra,) =
resources.query_system::<(Ra,)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let F =
Query::<F>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
A, B, C, D, E, F)
}
}
<<(Ra,) as ResourceQuery>::Fetch
as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra,) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<F>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A> IntoForEachSystem<(), (Ra, Rb), (A,)> for Func
where Func: FnMut(Ra, Rb, A) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A,) in
world.query::<(A,)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,)>(world);
},})
}
}
impl <Func, Ra, Rb, A> IntoForEachSystem<(Commands,), (Ra, Rb), (A,)>
for Func where Func: FnMut(Commands, Ra, Rb, A) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A,) in
world.query::<(A,)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B> IntoForEachSystem<(), (Ra, Rb), (A, B)> for
Func where Func: FnMut(Ra, Rb, A, B) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B) in
world.query::<(A,
B)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B>
IntoForEachSystem<(Commands,), (Ra, Rb), (A, B)> for Func where
Func: FnMut(Commands, Ra, Rb, A, B) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B) in
world.query::<(A,
B)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C>
IntoForEachSystem<(), (Ra, Rb), (A, B, C)> for Func where
Func: FnMut(Ra, Rb, A, B, C) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C) in
world.query::<(A, B,
C)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C>
IntoForEachSystem<(Commands,), (Ra, Rb), (A, B, C)> for Func where
Func: FnMut(Commands, Ra, Rb, A, B, C) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C) in
world.query::<(A, B,
C)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C, D>
IntoForEachSystem<(), (Ra, Rb), (A, B, C, D)> for Func where
Func: FnMut(Ra, Rb, A, B, C, D) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C, D) in
world.query::<(A, B, C,
D)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C, D>
IntoForEachSystem<(Commands,), (Ra, Rb), (A, B, C, D)> for Func where
Func: FnMut(Commands, Ra, Rb, A, B, C, D) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C, D) in
world.query::<(A, B, C,
D)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E>
IntoForEachSystem<(), (Ra, Rb), (A, B, C, D, E)> for Func where
Func: FnMut(Ra, Rb, A, B, C, D, E) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C, D, E) in
world.query::<(A, B, C,
D,
E)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E>
IntoForEachSystem<(Commands,), (Ra, Rb), (A, B, C, D, E)> for Func
where Func: FnMut(Commands, Ra, Rb, A, B, C, D, E) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C, D, E) in
world.query::<(A, B, C,
D,
E)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E, F>
IntoForEachSystem<(), (Ra, Rb), (A, B, C, D, E, F)> for Func where
Func: FnMut(Ra, Rb, A, B, C, D, E, F) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C, D, E, F) in
world.query::<(A, B, C,
D, E,
F)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E,
F)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E, F>
IntoForEachSystem<(Commands,), (Ra, Rb), (A, B, C, D, E, F)> for Func
where Func: FnMut(Commands, Ra, Rb, A, B, C, D, E, F) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C, D, E, F) in
world.query::<(A, B, C,
D, E,
F)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E,
F)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E, F, G>
IntoForEachSystem<(), (Ra, Rb), (A, B, C, D, E, F, G)> for Func where
Func: FnMut(Ra, Rb, A, B, C, D, E, F, G) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C, D, E, F, G) in
world.query::<(A, B, C,
D, E, F,
G)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E,
F, G)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E, F, G>
IntoForEachSystem<(Commands,), (Ra, Rb), (A, B, C, D, E, F, G)> for
Func where Func: FnMut(Commands, Ra, Rb, A, B, C, D, E, F, G) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C, D, E, F, G) in
world.query::<(A, B, C,
D, E, F,
G)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E,
F, G)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E, F, G, H>
IntoForEachSystem<(), (Ra, Rb), (A, B, C, D, E, F, G, H)> for Func
where Func: FnMut(Ra, Rb, A, B, C, D, E, F, G, H) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item,
<<H as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, H: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C, D, E, F, G, H)
in
world.query::<(A, B, C,
D, E, F,
G,
H)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E,
F, G, H)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G,
H)>(world);
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E, F, G, H>
IntoForEachSystem<(Commands,), (Ra, Rb), (A, B, C, D, E, F, G, H)>
for Func where
Func: FnMut(Commands, Ra, Rb, A, B, C, D, E, F, G, H) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item,
<<H as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, H: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
for (A, B, C, D, E, F, G, H)
in
world.query::<(A, B, C,
D, E, F,
G,
H)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E,
F, G, H)
}
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G,
H)>(world);
},})
}
}
impl <Func, Ra, Rb> IntoQuerySystem<(), (Ra, Rb), ()> for Func where
Func: FnMut(Ra, Rb) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item) + Send +
Sync + 'static, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone())
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
},})
}
}
impl <Func, Ra, Rb> IntoQuerySystem<(Commands,), (Ra, Rb), ()> for
Func where Func: FnMut(Commands, Ra, Rb) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item) + Send +
Sync + 'static, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone())
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
},})
}
}
impl <Func, Ra, Rb, A> IntoQuerySystem<(), (Ra, Rb), (A,)> for Func
where Func: FnMut(Ra, Rb, Query<A>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>) + Send + Sync + 'static, A: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A> IntoQuerySystem<(Commands,), (Ra, Rb), (A,)>
for Func where Func: FnMut(Commands, Ra, Rb, Query<A>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>) + Send + Sync + 'static, A: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A, B> IntoQuerySystem<(), (Ra, Rb), (A, B)> for
Func where Func: FnMut(Ra, Rb, Query<A>, Query<B>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>) + Send + Sync + 'static, A: HecsQuery,
B: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A, B>
IntoQuerySystem<(Commands,), (Ra, Rb), (A, B)> for Func where
Func: FnMut(Commands, Ra, Rb, Query<A>, Query<B>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>) + Send + Sync + 'static, A: HecsQuery,
B: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A, B, C> IntoQuerySystem<(), (Ra, Rb), (A, B, C)>
for Func where Func: FnMut(Ra, Rb, Query<A>, Query<B>, Query<C>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>) + Send + Sync + 'static,
A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A, B, C>
IntoQuerySystem<(Commands,), (Ra, Rb), (A, B, C)> for Func where
Func: FnMut(Commands, Ra, Rb, Query<A>, Query<B>, Query<C>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>) + Send + Sync + 'static,
A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A, B, C, D>
IntoQuerySystem<(), (Ra, Rb), (A, B, C, D)> for Func where
Func: FnMut(Ra, Rb, Query<A>, Query<B>, Query<C>, Query<D>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A, B, C, D>
IntoQuerySystem<(Commands,), (Ra, Rb), (A, B, C, D)> for Func where
Func: FnMut(Commands, Ra, Rb, Query<A>, Query<B>, Query<C>,
Query<D>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E>
IntoQuerySystem<(), (Ra, Rb), (A, B, C, D, E)> for Func where
Func: FnMut(Ra, Rb, Query<A>, Query<B>, Query<C>, Query<D>,
Query<E>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>) + Send +
Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E>
IntoQuerySystem<(Commands,), (Ra, Rb), (A, B, C, D, E)> for Func
where
Func: FnMut(Commands, Ra, Rb, Query<A>, Query<B>, Query<C>, Query<D>,
Query<E>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>) + Send +
Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E, F>
IntoQuerySystem<(), (Ra, Rb), (A, B, C, D, E, F)> for Func where
Func: FnMut(Ra, Rb, Query<A>, Query<B>, Query<C>, Query<D>, Query<E>,
Query<F>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>, Query<F>) +
Send + Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, F: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
let F = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E,
F]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let F =
Query::<F>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E, F)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<F>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, A, B, C, D, E, F>
IntoQuerySystem<(Commands,), (Ra, Rb), (A, B, C, D, E, F)> for Func
where
Func: FnMut(Commands, Ra, Rb, Query<A>, Query<B>, Query<C>, Query<D>,
Query<E>, Query<F>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>, Query<F>) +
Send + Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, F: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
let F = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E,
F]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb) =
resources.query_system::<(Ra,
Rb)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let F =
Query::<F>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
A, B, C, D, E, F)
}
}
<<(Ra, Rb) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra,
Rb)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb) as ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<F>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A> IntoForEachSystem<(), (Ra, Rb, Rc), (A,)>
for Func where Func: FnMut(Ra, Rb, Rc, A) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A,) in
world.query::<(A,)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc), (A,)> for Func where
Func: FnMut(Commands, Ra, Rb, Rc, A) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A,) in
world.query::<(A,)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B>
IntoForEachSystem<(), (Ra, Rb, Rc), (A, B)> for Func where
Func: FnMut(Ra, Rb, Rc, A, B) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B) in
world.query::<(A,
B)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc), (A, B)> for Func where
Func: FnMut(Commands, Ra, Rb, Rc, A, B) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B) in
world.query::<(A,
B)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C>
IntoForEachSystem<(), (Ra, Rb, Rc), (A, B, C)> for Func where
Func: FnMut(Ra, Rb, Rc, A, B, C) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C) in
world.query::<(A, B,
C)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc), (A, B, C)> for Func
where Func: FnMut(Commands, Ra, Rb, Rc, A, B, C) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C) in
world.query::<(A, B,
C)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D>
IntoForEachSystem<(), (Ra, Rb, Rc), (A, B, C, D)> for Func where
Func: FnMut(Ra, Rb, Rc, A, B, C, D) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C, D) in
world.query::<(A, B, C,
D)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc), (A, B, C, D)> for Func
where Func: FnMut(Commands, Ra, Rb, Rc, A, B, C, D) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C, D) in
world.query::<(A, B, C,
D)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E>
IntoForEachSystem<(), (Ra, Rb, Rc), (A, B, C, D, E)> for Func where
Func: FnMut(Ra, Rb, Rc, A, B, C, D, E) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery
{
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C, D, E) in
world.query::<(A, B, C,
D,
E)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc), (A, B, C, D, E)> for
Func where Func: FnMut(Commands, Ra, Rb, Rc, A, B, C, D, E) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery
{
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C, D, E) in
world.query::<(A, B, C,
D,
E)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E, F>
IntoForEachSystem<(), (Ra, Rb, Rc), (A, B, C, D, E, F)> for Func
where Func: FnMut(Ra, Rb, Rc, A, B, C, D, E, F) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C, D, E, F) in
world.query::<(A, B, C,
D, E,
F)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E,
F)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E, F>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc), (A, B, C, D, E, F)> for
Func where Func: FnMut(Commands, Ra, Rb, Rc, A, B, C, D, E, F) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C, D, E, F) in
world.query::<(A, B, C,
D, E,
F)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E,
F)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E, F, G>
IntoForEachSystem<(), (Ra, Rb, Rc), (A, B, C, D, E, F, G)> for Func
where Func: FnMut(Ra, Rb, Rc, A, B, C, D, E, F, G) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C, D, E, F, G) in
world.query::<(A, B, C,
D, E, F,
G)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E,
F, G)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E, F, G>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc), (A, B, C, D, E, F, G)>
for Func where
Func: FnMut(Commands, Ra, Rb, Rc, A, B, C, D, E, F, G) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C, D, E, F, G) in
world.query::<(A, B, C,
D, E, F,
G)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E,
F, G)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E, F, G, H>
IntoForEachSystem<(), (Ra, Rb, Rc), (A, B, C, D, E, F, G, H)> for
Func where Func: FnMut(Ra, Rb, Rc, A, B, C, D, E, F, G, H) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item,
<<H as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, H: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C, D, E, F, G, H)
in
world.query::<(A, B, C,
D, E, F,
G,
H)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E,
F, G, H)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G,
H)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E, F, G, H>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc),
(A, B, C, D, E, F, G, H)> for Func where
Func: FnMut(Commands, Ra, Rb, Rc, A, B, C, D, E, F, G, H) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item,
<<H as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, H: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
for (A, B, C, D, E, F, G, H)
in
world.query::<(A, B, C,
D, E, F,
G,
H)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E,
F, G, H)
}
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G,
H)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc> IntoQuerySystem<(), (Ra, Rb, Rc), ()> for Func
where Func: FnMut(Ra, Rb, Rc) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item) + Send +
Sync + 'static, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone())
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
},})
}
}
impl <Func, Ra, Rb, Rc> IntoQuerySystem<(Commands,), (Ra, Rb, Rc), ()>
for Func where Func: FnMut(Commands, Ra, Rb, Rc) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item) + Send +
Sync + 'static, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone())
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
},})
}
}
impl <Func, Ra, Rb, Rc, A> IntoQuerySystem<(), (Ra, Rb, Rc), (A,)> for
Func where Func: FnMut(Ra, Rb, Rc, Query<A>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>) + Send + Sync + 'static, A: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A>
IntoQuerySystem<(Commands,), (Ra, Rb, Rc), (A,)> for Func where
Func: FnMut(Commands, Ra, Rb, Rc, Query<A>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>) + Send + Sync + 'static, A: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A, B>
IntoQuerySystem<(), (Ra, Rb, Rc), (A, B)> for Func where
Func: FnMut(Ra, Rb, Rc, Query<A>, Query<B>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>) + Send + Sync + 'static, A: HecsQuery,
B: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery
{
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A, B>
IntoQuerySystem<(Commands,), (Ra, Rb, Rc), (A, B)> for Func where
Func: FnMut(Commands, Ra, Rb, Rc, Query<A>, Query<B>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>) + Send + Sync + 'static, A: HecsQuery,
B: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery
{
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C>
IntoQuerySystem<(), (Ra, Rb, Rc), (A, B, C)> for Func where
Func: FnMut(Ra, Rb, Rc, Query<A>, Query<B>, Query<C>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>) + Send + Sync + 'static,
A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C>
IntoQuerySystem<(Commands,), (Ra, Rb, Rc), (A, B, C)> for Func where
Func: FnMut(Commands, Ra, Rb, Rc, Query<A>, Query<B>, Query<C>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>) + Send + Sync + 'static,
A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D>
IntoQuerySystem<(), (Ra, Rb, Rc), (A, B, C, D)> for Func where
Func: FnMut(Ra, Rb, Rc, Query<A>, Query<B>, Query<C>, Query<D>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D>
IntoQuerySystem<(Commands,), (Ra, Rb, Rc), (A, B, C, D)> for Func
where
Func: FnMut(Commands, Ra, Rb, Rc, Query<A>, Query<B>, Query<C>,
Query<D>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E>
IntoQuerySystem<(), (Ra, Rb, Rc), (A, B, C, D, E)> for Func where
Func: FnMut(Ra, Rb, Rc, Query<A>, Query<B>, Query<C>, Query<D>,
Query<E>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>) + Send +
Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E>
IntoQuerySystem<(Commands,), (Ra, Rb, Rc), (A, B, C, D, E)> for Func
where
Func: FnMut(Commands, Ra, Rb, Rc, Query<A>, Query<B>, Query<C>,
Query<D>, Query<E>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>) + Send +
Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E, F>
IntoQuerySystem<(), (Ra, Rb, Rc), (A, B, C, D, E, F)> for Func where
Func: FnMut(Ra, Rb, Rc, Query<A>, Query<B>, Query<C>, Query<D>,
Query<E>, Query<F>) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>, Query<F>) +
Send + Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, F: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
let F = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E,
F]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let F =
Query::<F>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E, F)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<F>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, A, B, C, D, E, F>
IntoQuerySystem<(Commands,), (Ra, Rb, Rc), (A, B, C, D, E, F)> for
Func where
Func: FnMut(Commands, Ra, Rb, Rc, Query<A>, Query<B>, Query<C>,
Query<D>, Query<E>, Query<F>) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
Query<A>, Query<B>, Query<C>, Query<D>, Query<E>, Query<F>) +
Send + Sync + 'static, A: HecsQuery, B: HecsQuery, C: HecsQuery,
D: HecsQuery, E: HecsQuery, F: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
#[allow(unused_assignments)]
#[allow(unused_mut)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
let A = ArchetypeAccess::default();
let B = ArchetypeAccess::default();
let C = ArchetypeAccess::default();
let D = ArchetypeAccess::default();
let E = ArchetypeAccess::default();
let F = ArchetypeAccess::default();
Box::new(SystemFn{state:
QuerySystemState{archetype_accesses:
<[_]>::into_vec(box
[A,
B,
C,
D,
E,
F]),
commands:
Commands::default(),},
thread_local_execution:
ThreadLocalExecution::NextFlush,
id,
name: core::any::type_name::<Self>().into(),
func:
move
|world, resources, archetype_access,
state|
{
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc) =
resources.query_system::<(Ra,
Rb,
Rc)>(id);
let mut i = 0;
let A =
Query::<A>::new(world,
&state.archetype_accesses[i]);
i += 1;
let B =
Query::<B>::new(world,
&state.archetype_accesses[i]);
i += 1;
let C =
Query::<C>::new(world,
&state.archetype_accesses[i]);
i += 1;
let D =
Query::<D>::new(world,
&state.archetype_accesses[i]);
i += 1;
let E =
Query::<E>::new(world,
&state.archetype_accesses[i]);
i += 1;
let F =
Query::<F>::new(world,
&state.archetype_accesses[i]);
i += 1;
let commands =
&state.commands;
unsafe {
self(commands.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
A, B, C, D, E, F)
}
}
<<(Ra, Rb, Rc) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{
state.commands.apply(world,
resources);
},
init_func:
move |resources|
{
<(Ra, Rb,
Rc)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc) as ResourceQuery>::Fetch
as FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, state|
{
archetype_access.clear();
let mut i = 0;
let mut access:
&mut ArchetypeAccess;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<A>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<B>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<C>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<D>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<E>(world);
archetype_access.union(access);
i += 1;
access =
&mut state.archetype_accesses[i];
access.clear();
access.set_access_for_query::<F>(world);
archetype_access.union(access);
i += 1;
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A>
IntoForEachSystem<(), (Ra, Rb, Rc, Rd), (A,)> for Func where
Func: FnMut(Ra, Rb, Rc, Rd, A) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A,) in
world.query::<(A,)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc, Rd), (A,)> for Func where
Func: FnMut(Commands, Ra, Rb, Rc, Rd, A) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A,) in
world.query::<(A,)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B>
IntoForEachSystem<(), (Ra, Rb, Rc, Rd), (A, B)> for Func where
Func: FnMut(Ra, Rb, Rc, Rd, A, B) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B) in
world.query::<(A,
B)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc, Rd), (A, B)> for Func
where Func: FnMut(Commands, Ra, Rb, Rc, Rd, A, B) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B) in
world.query::<(A,
B)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C>
IntoForEachSystem<(), (Ra, Rb, Rc, Rd), (A, B, C)> for Func where
Func: FnMut(Ra, Rb, Rc, Rd, A, B, C) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B, C) in
world.query::<(A, B,
C)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B, C)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc, Rd), (A, B, C)> for Func
where Func: FnMut(Commands, Ra, Rb, Rc, Rd, A, B, C) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B, C) in
world.query::<(A, B,
C)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B, C)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C, D>
IntoForEachSystem<(), (Ra, Rb, Rc, Rd), (A, B, C, D)> for Func where
Func: FnMut(Ra, Rb, Rc, Rd, A, B, C, D) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery,
Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B, C, D) in
world.query::<(A, B, C,
D)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B, C, D)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C, D>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc, Rd), (A, B, C, D)> for
Func where Func: FnMut(Commands, Ra, Rb, Rc, Rd, A, B, C, D) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery,
Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B, C, D) in
world.query::<(A, B, C,
D)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B, C, D)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C, D, E>
IntoForEachSystem<(), (Ra, Rb, Rc, Rd), (A, B, C, D, E)> for Func
where Func: FnMut(Ra, Rb, Rc, Rd, A, B, C, D, E) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B, C, D, E) in
world.query::<(A, B, C,
D,
E)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B, C, D, E)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C, D, E>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc, Rd), (A, B, C, D, E)> for
Func where Func: FnMut(Commands, Ra, Rb, Rc, Rd, A, B, C, D, E) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B, C, D, E) in
world.query::<(A, B, C,
D,
E)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B, C, D, E)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C, D, E, F>
IntoForEachSystem<(), (Ra, Rb, Rc, Rd), (A, B, C, D, E, F)> for Func
where Func: FnMut(Ra, Rb, Rc, Rd, A, B, C, D, E, F) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B, C, D, E, F) in
world.query::<(A, B, C,
D, E,
F)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B, C, D, E,
F)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C, D, E, F>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc, Rd), (A, B, C, D, E, F)>
for Func where
Func: FnMut(Commands, Ra, Rb, Rc, Rd, A, B, C, D, E, F) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, Ra: ResourceQuery, Rb: ResourceQuery,
Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B, C, D, E, F) in
world.query::<(A, B, C,
D, E,
F)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B, C, D, E,
F)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C, D, E, F, G>
IntoForEachSystem<(), (Ra, Rb, Rc, Rd), (A, B, C, D, E, F, G)> for
Func where Func: FnMut(Ra, Rb, Rc, Rd, A, B, C, D, E, F, G) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B, C, D, E, F, G) in
world.query::<(A, B, C,
D, E, F,
G)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B, C, D, E,
F, G)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C, D, E, F, G>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc, Rd),
(A, B, C, D, E, F, G)> for Func where
Func: FnMut(Commands, Ra, Rb, Rc, Rd, A, B, C, D, E, F, G) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, Ra: ResourceQuery,
Rb: ResourceQuery, Rc: ResourceQuery, Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B, C, D, E, F, G) in
world.query::<(A, B, C,
D, E, F,
G)>().iter()
{
unsafe {
self(state.clone(),
Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B, C, D, E,
F, G)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C, D, E, F, G, H>
IntoForEachSystem<(), (Ra, Rb, Rc, Rd), (A, B, C, D, E, F, G, H)> for
Func where Func: FnMut(Ra, Rb, Rc, Rd, A, B, C, D, E, F, G, H) +
FnMut(<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item,
<<H as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, H: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery,
Rd: ResourceQuery {
#[allow(non_snake_case)]
#[allow(unused_variables)]
#[allow(unused_unsafe)]
fn system(mut self) -> Box<dyn System> {
let id = SystemId::new();
Box::new(SystemFn{state: Commands::default(),
thread_local_execution:
ThreadLocalExecution::NextFlush,
name: core::any::type_name::<Self>().into(),
id,
func:
move
|world, resources,
_archetype_access, state|
{
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::borrow(&resources);
{
let (Ra, Rb, Rc, Rd) =
resources.query_system::<(Ra,
Rb,
Rc,
Rd)>(id);
for (A, B, C, D, E, F, G, H)
in
world.query::<(A, B, C,
D, E, F,
G,
H)>().iter()
{
unsafe {
self(Ra.unsafe_clone(),
Rb.unsafe_clone(),
Rc.unsafe_clone(),
Rd.unsafe_clone(),
A, B, C, D, E,
F, G, H)
}
}
}
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::release(&resources);
},
thread_local_func:
move |world, resources, state|
{ state.apply(world, resources); },
init_func:
move |resources|
{
<(Ra, Rb, Rc,
Rd)>::initialize(resources,
Some(id));
},
resource_access:
<<(Ra, Rb, Rc, Rd) as
ResourceQuery>::Fetch as
FetchResource>::access(),
archetype_access:
ArchetypeAccess::default(),
set_archetype_access:
|world, archetype_access, _state|
{
archetype_access.clear();
archetype_access.set_access_for_query::<(A,
B,
C,
D,
E,
F,
G,
H)>(world);
},})
}
}
impl <Func, Ra, Rb, Rc, Rd, A, B, C, D, E, F, G, H>
IntoForEachSystem<(Commands,), (Ra, Rb, Rc, Rd),
(A, B, C, D, E, F, G, H)> for Func where
Func: FnMut(Commands, Ra, Rb, Rc, Rd, A, B, C, D, E, F, G, H) +
FnMut(Commands,
<<Ra as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rb as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rc as ResourceQuery>::Fetch as FetchResource>::Item,
<<Rd as ResourceQuery>::Fetch as FetchResource>::Item,
<<A as HecsQuery>::Fetch as Fetch>::Item,
<<B as HecsQuery>::Fetch as Fetch>::Item,
<<C as HecsQuery>::Fetch as Fetch>::Item,
<<D as HecsQuery>::Fetch as Fetch>::Item,
<<E as HecsQuery>::Fetch as Fetch>::Item,
<<F as HecsQuery>::Fetch as Fetch>::Item,
<<G as HecsQuery>::Fetch as Fetch>::Item,
<<H as HecsQuery>::Fetch as Fetch>::Item) + Send + Sync +
'static, A: HecsQuery, B: HecsQuery, C: HecsQuery, D: HecsQuery,
E: HecsQuery, F: HecsQuery, G: HecsQuery, H: HecsQuery,
Ra: ResourceQuery, Rb: ResourceQuery, Rc: ResourceQuery,
Rd: ResourceQuery {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment