ForgeDocs
Documentation for the forge framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Forge.Entities.BaseEvent< TDerived > Class Template Reference

Base event type that all events must derive from. More...

Inheritance diagram for Forge.Entities.BaseEvent< TDerived >:
Forge.Entities.AddedDataEvent Forge.Entities.DestroyedEntityEvent Forge.Entities.EntityAddedEvent Forge.Entities.EntityRemovedEvent Forge.Entities.HideEntityEvent Forge.Entities.RemovedDataEvent Forge.Entities.ShowEntityEvent

Static Protected Member Functions

static TDerived GetInstance ()
 Helper method to get an instance of the event. The instance may be populated with data, so make sure to fully initialize it. If there is no instance that can be reused, a new one is allocated using the default constructor. More...
 

Detailed Description

Base event type that all events must derive from.

BaseEvent provides a number of helpful static methods (available only to the derived type) that make creating a factory for BaseEvent extremely simple. However, it is imperative that the factory methods be used, otherwise a memory leak will occur. The factory methods are thread-safe.

Type Constraints
TDerived :BaseEvent<TDerived> 

Member Function Documentation

static TDerived Forge.Entities.BaseEvent< TDerived >.GetInstance ( )
staticprotected

Helper method to get an instance of the event. The instance may be populated with data, so make sure to fully initialize it. If there is no instance that can be reused, a new one is allocated using the default constructor.


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