AlphaFramework API  1.0.3
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.INamed< TSelf > NanoByte::Common::Controls::IHighlightColor NanoByte::Common::ICloneable< T > 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]
 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.INamed< TSelf >
string Name
 
- 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

◆ Clone()

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

Creates a deep copy of this TSelf .

Returns
The cloned TSelf .

Implements NanoByte::Common::ICloneable< T >.

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

◆ LoadAll()

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

Loads the list of Template<TSelf>s from FileName.

Member Data Documentation

◆ FileName

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

The XML file Template<TSelf> instances are stored in.

Property Documentation

◆ All

A list of all loaded Template<TSelf>s.

See also
LoadAll

◆ Description

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

A short English description of this class for developers.

◆ HighlightColor

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

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

◆ Name

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: