OmegaEngine API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
OmegaEngine.EngineElement Class Reference

A common base class for all objects that need an Engine instance. More...

Inheritance diagram for OmegaEngine.EngineElement:
OmegaEngine.Audio.Song OmegaEngine.Audio.Sound OmegaEngine.Engine OmegaEngine.EngineElementCollection< T > OmegaEngine.Graphics.Renderables.Renderable OmegaEngine.Graphics.Scene OmegaEngine.Graphics.Shaders.Shader OmegaEngine.Graphics.View

Public Member Functions

void Dispose ()
 

Public Attributes

bool IsEngineSet => _engine != null
 true if the Engine has been set. More...
 

Protected Member Functions

void RegisterChild (EngineElement element, bool autoDispose=true)
 Registers a child EngineElement for automatic Engine setting and Dispose calling. More...
 
void UnregisterChild (EngineElement element)
 Unregisters a child EngineElement (opposite of RegisterChild). More...
 
virtual void OnEngineSet ()
 Hook that is calld when Engine is set for the first time. More...
 
virtual void OnDispose ()
 Hook that is called when the object needs to dispose its internal resources. More...
 

Properties

Engine Engine [get, set]
 The Engine instance used by this object. Must be set before using the object. May not be changed once it has been set! More...
 
bool IsDisposed [get, set]
 Indicates whether this object has been disposed and can therefore no longer be used. More...
 

Detailed Description

A common base class for all objects that need an Engine instance.

Member Function Documentation

virtual void OmegaEngine.EngineElement.OnDispose ( )
inlineprotectedvirtual
virtual void OmegaEngine.EngineElement.OnEngineSet ( )
inlineprotectedvirtual
void OmegaEngine.EngineElement.RegisterChild ( EngineElement  element,
bool  autoDispose = true 
)
inlineprotected

Registers a child EngineElement for automatic Engine setting and Dispose calling.

Parameters
elementThe EngineElement to register. Silently ignores null.
autoDisposeControls whether the element is automatically disposed when Dispose is called.
void OmegaEngine.EngineElement.UnregisterChild ( EngineElement  element)
inlineprotected

Unregisters a child EngineElement (opposite of RegisterChild).

Parameters
elementThe EngineElement to unregister. Silently ignores null.

Member Data Documentation

bool OmegaEngine.EngineElement.IsEngineSet => _engine != null

true if the Engine has been set.

Property Documentation

Engine OmegaEngine.EngineElement.Engine
getset

The Engine instance used by this object. Must be set before using the object. May not be changed once it has been set!

Exceptions
InvalidOperationExceptionTrying to read the engine before it has been set.
bool OmegaEngine.EngineElement.IsDisposed
getset

Indicates whether this object has been disposed and can therefore no longer be used.


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