pub struct PropertyStore<E: Entity> { /* private fields */ }Expand description
A wrapper around a vector of property value stores.
Implementations§
Source§impl<E: Entity> PropertyStore<E>
impl<E: Entity> PropertyStore<E>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new PropertyStore.
Sourcepub fn get<P: Property<E>>(&self) -> &PropertyValueStoreCore<E, P>
pub fn get<P: Property<E>>(&self) -> &PropertyValueStoreCore<E, P>
Fetches an immutable reference to the PropertyValueStoreCore<E, P>.
Sourcepub fn get_mut<P: Property<E>>(&mut self) -> &mut PropertyValueStoreCore<E, P>
pub fn get_mut<P: Property<E>>(&mut self) -> &mut PropertyValueStoreCore<E, P>
Fetches a mutable reference to the PropertyValueStoreCore<E, P>.
Sourcepub fn set_property_indexed<P: Property<E>>(
&mut self,
index_type: PropertyIndexType,
)
pub fn set_property_indexed<P: Property<E>>( &mut self, index_type: PropertyIndexType, )
Sets the index type for P. Passing PropertyIndexType::Unindexed removes any existing index for P.
Note that the index might not live in the PropertyValueStore associated with P itself, as in the case
of multi-properties which share a single index among all equivalent multi-properties.
Sourcepub fn create_value_change_counter<PL, P>(&mut self) -> usize
pub fn create_value_change_counter<PL, P>(&mut self) -> usize
Creates a stratified value change counter for tracked property P with strata PL.
Returns the counter ID.
Sourcepub fn index_unindexed_entities_for_property_id(
&mut self,
context: &Context,
property_id: usize,
)
pub fn index_unindexed_entities_for_property_id( &mut self, context: &Context, property_id: usize, )
Updates the index of the property having the given ID for any entities that have been added to the context since the last time the index was updated.
Sourcepub fn index_unindexed_entities_for_all_properties(&mut self, context: &Context)
pub fn index_unindexed_entities_for_all_properties(&mut self, context: &Context)
Updates all indexed properties for any entities that have been added since the last update.