C# Class Axiom.Overlays.OverlayElementManager

This class acts as a repository and regitrar of overlay components.
OverlayElementManager's job is to manage the lifecycle of OverlayElement (subclass) instances, and also to register plugin suppliers of new components.
Inheritance: IDisposable
Afficher le fichier Open project: WolfgangSt/axiom Class Usage Examples

Private Properties

Свойство Type Description
GetElementTable OverlayElement>.Dictionary
OverlayElementManager System

Méthodes publiques

Méthode Description
AddElementFactory ( IOverlayElementFactory factory ) : void

Registers a new OverlayElementFactory with this manager.

Should be used by plugins or other apps wishing to provide a new OverlayElement subclass.

CloneOverlayElementFromTemplate ( string template, string name ) : OverlayElement

Clones an overlay element from a template

CreateElement ( string typeName, string instanceName ) : OverlayElement

Creates a new OverlayElement of the type requested.

CreateElement ( string typeName, string instanceName, bool isTemplate ) : OverlayElement

Creates a new OverlayElement of the type requested.

CreateElementFromFactory ( string typeName, string instanceName ) : OverlayElement

Creates an element of the specified type, with the specified name

A factory must be available to handle the requested type, or an exception will be thrown.

CreateElementFromTemplate ( string templateName, string typeName, string instanceName ) : OverlayElement

CreateElementFromTemplate ( string templateName, string typeName, string instanceName, bool isTemplate ) : OverlayElement

DestroyAllElements ( ) : void

destroys all OverlayElements

DestroyAllElements ( bool isTemplate ) : void

destroys all OverlayElements

DestroyElement ( OverlayElement element ) : void

Destroys the supplied OvelayElement

DestroyElement ( OverlayElement element, bool isTemplate ) : void

Destroys the supplied OvelayElement

DestroyElement ( string name ) : void

Destroys the specified OverlayElement

DestroyElement ( string name, bool isTemplate ) : void

Destroys the specified OverlayElement

GetElement ( string name ) : OverlayElement

Gets a reference to an existing element.

GetElement ( string name, bool isTemplate ) : OverlayElement

Gets a reference to an existing element.

Méthodes protégées

Méthode Description
dispose ( bool disposeManagedResources ) : void

Called when the engine is shutting down.

Private Methods

Méthode Description
GetElementTable ( bool isTemplate ) : OverlayElement>.Dictionary

Quick helper method to return the lookup table for the right element type.

OverlayElementManager ( ) : System

Internal constructor. This class cannot be instantiated externally.

Method Details

AddElementFactory() public méthode

Registers a new OverlayElementFactory with this manager.
Should be used by plugins or other apps wishing to provide a new OverlayElement subclass.
public AddElementFactory ( IOverlayElementFactory factory ) : void
factory IOverlayElementFactory
Résultat void

CloneOverlayElementFromTemplate() public méthode

Clones an overlay element from a template
public CloneOverlayElementFromTemplate ( string template, string name ) : OverlayElement
template string template to clone
name string name of the new element
Résultat OverlayElement

CreateElement() public méthode

Creates a new OverlayElement of the type requested.
public CreateElement ( string typeName, string instanceName ) : OverlayElement
typeName string The type of element to create is passed in as a string because this /// allows plugins to register new types of component.
instanceName string The type of element to create.
Résultat OverlayElement

CreateElement() public méthode

Creates a new OverlayElement of the type requested.
public CreateElement ( string typeName, string instanceName, bool isTemplate ) : OverlayElement
typeName string The type of element to create is passed in as a string because this /// allows plugins to register new types of component.
instanceName string The type of element to create.
isTemplate bool
Résultat OverlayElement

CreateElementFromFactory() public méthode

Creates an element of the specified type, with the specified name
A factory must be available to handle the requested type, or an exception will be thrown.
public CreateElementFromFactory ( string typeName, string instanceName ) : OverlayElement
typeName string
instanceName string
Résultat OverlayElement

CreateElementFromTemplate() public méthode

public CreateElementFromTemplate ( string templateName, string typeName, string instanceName ) : OverlayElement
templateName string
typeName string
instanceName string
Résultat OverlayElement

CreateElementFromTemplate() public méthode

public CreateElementFromTemplate ( string templateName, string typeName, string instanceName, bool isTemplate ) : OverlayElement
templateName string
typeName string
instanceName string
isTemplate bool
Résultat OverlayElement

DestroyAllElements() public méthode

destroys all OverlayElements
public DestroyAllElements ( ) : void
Résultat void

DestroyAllElements() public méthode

destroys all OverlayElements
public DestroyAllElements ( bool isTemplate ) : void
isTemplate bool
Résultat void

DestroyElement() public méthode

Destroys the supplied OvelayElement
public DestroyElement ( OverlayElement element ) : void
element OverlayElement
Résultat void

DestroyElement() public méthode

Destroys the supplied OvelayElement
public DestroyElement ( OverlayElement element, bool isTemplate ) : void
element OverlayElement
isTemplate bool
Résultat void

DestroyElement() public méthode

Destroys the specified OverlayElement
public DestroyElement ( string name ) : void
name string
Résultat void

DestroyElement() public méthode

Destroys the specified OverlayElement
public DestroyElement ( string name, bool isTemplate ) : void
name string
isTemplate bool
Résultat void

GetElement() public méthode

Gets a reference to an existing element.
public GetElement ( string name ) : OverlayElement
name string Name of the element to retrieve.
Résultat OverlayElement

GetElement() public méthode

Gets a reference to an existing element.
public GetElement ( string name, bool isTemplate ) : OverlayElement
name string Name of the element to retrieve.
isTemplate bool
Résultat OverlayElement

dispose() protected méthode

Called when the engine is shutting down.
protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
Résultat void