[][src]Struct dces::system::EntitySystemManager

pub struct EntitySystemManager<T> where
    T: EntityContainer
{ pub priorities: BTreeMap<i32, Vec<u32>>, // some fields omitted }

The EntitySystemManager represents the main system storage.

Fields

priorities: BTreeMap<i32, Vec<u32>>

Priorities of the systems.

Methods

impl<T> EntitySystemManager<T> where
    T: EntityContainer
[src]

pub fn new() -> Self
[src]

Creates a new entity system manager with default values.

pub fn register_init_system(
    &mut self,
    init_system: impl System<T>
)
[src]

Registers the init system.

pub fn register_cleanup_system(
    &mut self,
    cleanup_system: impl System<T>
)
[src]

Registers the cleanup system.

pub fn register_system(
    &mut self,
    system: impl System<T>,
    system_id: u32
)
[src]

Registers a new system.

pub fn remove_system(&mut self, system_id: u32)
[src]

Removes a system from the storage.

pub fn register_priority(&mut self, priority: Priority, system_id: u32)
[src]

Register a priority for the system with the given system_id.

pub fn borrow_entity_system(
    &self,
    entity_system_id: u32
) -> Result<&EntitySystem<T>, NotFound>
[src]

Returns a reference of a entity system. If the entity system does not exists NotFound will be returned.

pub fn borrow_init_system(&self) -> &Option<EntitySystem<T>>
[src]

Returns a reference of the init entity system. If the init entity system does not exists None will be returned.

pub fn borrow_cleanup_system(&self) -> &Option<EntitySystem<T>>
[src]

Returns a reference of the cleanup entity system. If the init entity system does not exists None will be returned.

Trait Implementations

impl<T: Default> Default for EntitySystemManager<T> where
    T: EntityContainer
[src]

Auto Trait Implementations

impl<T> !Send for EntitySystemManager<T>

impl<T> !Sync for EntitySystemManager<T>

Blanket Implementations

impl<T> Component for T where
    T: Any
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]