AlphaFramework API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Static Public Attributes | Properties | List of all members
AlphaFramework.World.Templates.Template< TSelf > Class Template Reference

A set of data used as a prototype for constructing new objects at runtime. More...

Inheritance diagram for AlphaFramework.World.Templates.Template< TSelf >:
NanoByte::Common::Controls::IHighlightColor AlphaFramework.World.Templates.EntityTemplateBase< TSelf >

Public Member Functions

override string ToString ()
 
virtual TSelf Clone ()
 Creates a deep copy of this TSelf . More...
 

Static Public Member Functions

static void LoadAll ()
 Loads the list of Template{TSelf}s from FileName. More...
 

Static Public Attributes

static string FileName => typeof(TSelf).Name + "s.xml"
 The XML file Template{TSelf} instances are stored in. More...
 

Properties

string Name [get, set]
 The name of this class. Used in map files as a reference. Must be unique and is case-sensitive! More...
 
Color HighlightColor [get, set]
 The color to highlight this class with in list representations. Color.Empty for no highlighting. More...
 
string Description [get, set]
 A short English description of this class for developers. More...
 
static NamedCollection< TSelf > All [get]
 A list of all loaded Template{TSelf}s. More...
 
- Properties inherited from NanoByte::Common::Controls::IHighlightColor
Color HighlightColor
 

Detailed Description

A set of data used as a prototype for constructing new objects at runtime.

Template Parameters
TSelfThe type of the class itself.
Type Constraints
TSelf :Template<TSelf> 

Member Function Documentation

virtual TSelf AlphaFramework.World.Templates.Template< TSelf >.Clone ( )
inlinevirtual

Creates a deep copy of this TSelf .

Returns
The cloned TSelf .

Reimplemented in AlphaFramework.World.Templates.EntityTemplateBase< TSelf >.

static void AlphaFramework.World.Templates.Template< TSelf >.LoadAll ( )
inlinestatic

Loads the list of Template{TSelf}s from FileName.

Member Data Documentation

string AlphaFramework.World.Templates.Template< TSelf >.FileName => typeof(TSelf).Name + "s.xml"
static

The XML file Template{TSelf} instances are stored in.

Property Documentation

NamedCollection<TSelf> AlphaFramework.World.Templates.Template< TSelf >.All
staticget

A list of all loaded Template{TSelf}s.

See Also
LoadAll
string AlphaFramework.World.Templates.Template< TSelf >.Description
getset

A short English description of this class for developers.

Color AlphaFramework.World.Templates.Template< TSelf >.HighlightColor
getset

The color to highlight this class with in list representations. Color.Empty for no highlighting.

string AlphaFramework.World.Templates.Template< TSelf >.Name
getset

The name of this class. Used in map files as a reference. Must be unique and is case-sensitive!


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