ForgeDocs
Documentation for the forge framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Forge.Entities.IQueryableEntity Interface Reference

An entity within the game state that can be queried for information about its current data. More...

Inheritance diagram for Forge.Entities.IQueryableEntity:
Forge.Entities.IEntity Forge.Entities.ITemplate

Public Member Functions

ICollection< DataAccessorSelectData (bool includeRemoved=false, Predicate< DataAccessor > filter=null, ICollection< DataAccessor > storage=null)
 Selects data inside of the entity that passes the given filter. More...
 
Data.IData Current (DataAccessor accessor)
 Gets the current data value for the given type. More...
 
Data.IVersioned Previous (DataAccessor accessor)
 Gets the previous data value for the data type. More...
 
bool ContainsData (DataAccessor accessor)
 Checks to see if this Entity contains an instance of the given data type. Keep in mind that an IQueryableEntity contains data one frame after it has been removed; both ContainsData(accessor) and WasRemoved(accessor) can return true. More...
 

Properties

string PrettyName [get, set]
 A non-unique string that represents a "human readable" name for the entity. This carries no weight in the simulation, and is only meant for diagnostics. More...
 

Detailed Description

An entity within the game state that can be queried for information about its current data.

Member Function Documentation

bool Forge.Entities.IQueryableEntity.ContainsData ( DataAccessor  accessor)

Checks to see if this Entity contains an instance of the given data type. Keep in mind that an IQueryableEntity contains data one frame after it has been removed; both ContainsData(accessor) and WasRemoved(accessor) can return true.

Data.IData Forge.Entities.IQueryableEntity.Current ( DataAccessor  accessor)

Gets the current data value for the given type.

Data.IVersioned Forge.Entities.IQueryableEntity.Previous ( DataAccessor  accessor)

Gets the previous data value for the data type.

ICollection<DataAccessor> Forge.Entities.IQueryableEntity.SelectData ( bool  includeRemoved = false,
Predicate< DataAccessor filter = null,
ICollection< DataAccessor storage = null 
)

Selects data inside of the entity that passes the given filter.

Parameters
includeRemovedShould data that has been removed, but is still in the queryable entity, be considered for selection? This means that Contains(accessor) will return false but WasRemoved(accessor) will return true.
filterThe predicate to check items to see if they should be contained inside of the result.
storageAn optional collection to append result to, instead of creating a new one. The collection will not be cleared by this method.
Returns
A list of data instances that pass the filter.

Property Documentation

string Forge.Entities.IQueryableEntity.PrettyName
getset

A non-unique string that represents a "human readable" name for the entity. This carries no weight in the simulation, and is only meant for diagnostics.


The documentation for this interface was generated from the following file: