Space Engineers
Public Member Functions | Public Attributes | List of all members
VRage.Game.MyDefinitionSet Class Reference

Inherited by Sandbox.Definitions.MyDefinitionManager.DefinitionSet.

Public Member Functions

void AddDefinition (MyDefinitionBase def)
 
bool AddOrRelaceDefinition (MyDefinitionBase def)
 
void RemoveDefinition (ref MyDefinitionId defId)
 
IEnumerable< T > GetDefinitionsOfType< T > ()
 
IEnumerable< T > GetDefinitionsOfTypeAndSubtypes< T > ()
 
bool ContainsDefinition (MyDefinitionId id)
 
GetDefinition< T > (MyStringHash subtypeId)
 
GetDefinition< T > (MyDefinitionId id)
 
virtual void OverrideBy (MyDefinitionSet definitionSet)
 
void Clear ()
 

Public Attributes

MyModContext Context
 
readonly Dictionary< Type, Dictionary< MyStringHash, MyDefinitionBase > > Definitions = new Dictionary<Type, Dictionary<MyStringHash, MyDefinitionBase>>()
 

Detailed Description

Definition at line 10 of file MyDefinitionSet.cs.

Member Function Documentation

void VRage.Game.MyDefinitionSet.AddDefinition ( MyDefinitionBase  def)
inline

Add a new definition to the set.

Crashes if existing.

Definition at line 21 of file MyDefinitionSet.cs.

bool VRage.Game.MyDefinitionSet.AddOrRelaceDefinition ( MyDefinitionBase  def)
inline

Add or replace an existing definition.

Definition at line 36 of file MyDefinitionSet.cs.

void VRage.Game.MyDefinitionSet.Clear ( )
inline

Definition at line 167 of file MyDefinitionSet.cs.

bool VRage.Game.MyDefinitionSet.ContainsDefinition ( MyDefinitionId  id)
inline

Definition at line 95 of file MyDefinitionSet.cs.

T VRage.Game.MyDefinitionSet.GetDefinition< T > ( MyStringHash  subtypeId)
inline
Type Constraints
T :MyDefinitionBase 

Definition at line 102 of file MyDefinitionSet.cs.

T VRage.Game.MyDefinitionSet.GetDefinition< T > ( MyDefinitionId  id)
inline
Type Constraints
T :MyDefinitionBase 

Definition at line 114 of file MyDefinitionSet.cs.

IEnumerable<T> VRage.Game.MyDefinitionSet.GetDefinitionsOfType< T > ( )
inline

Get all definitions of a given type.

Type Constraints
T :MyDefinitionBase 

Definition at line 67 of file MyDefinitionSet.cs.

IEnumerable<T> VRage.Game.MyDefinitionSet.GetDefinitionsOfTypeAndSubtypes< T > ( )
inline

Get all definitions of a given type.

Type Constraints
T :MyDefinitionBase 

Definition at line 79 of file MyDefinitionSet.cs.

virtual void VRage.Game.MyDefinitionSet.OverrideBy ( MyDefinitionSet  definitionSet)
inlinevirtual

Override the contents of this definition set with another.

Definition at line 128 of file MyDefinitionSet.cs.

void VRage.Game.MyDefinitionSet.RemoveDefinition ( ref MyDefinitionId  defId)
inline

Remove a definition if on the set.

Definition at line 55 of file MyDefinitionSet.cs.

Member Data Documentation

MyModContext VRage.Game.MyDefinitionSet.Context

Definition at line 12 of file MyDefinitionSet.cs.

readonly Dictionary<Type, Dictionary<MyStringHash, MyDefinitionBase> > VRage.Game.MyDefinitionSet.Definitions = new Dictionary<Type, Dictionary<MyStringHash, MyDefinitionBase>>()

Definition at line 14 of file MyDefinitionSet.cs.


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