Class SynthesizedTrait<T>
Representation for a single typed property in a Synthesized MARS Object
Inherited Members
Namespace: Unity.MARS.Data.Synthetic
Syntax
public abstract class SynthesizedTrait<T> : SynthesizedTrait, ISimulatable, ISynthesizedData, IProvidesTraits<T>, IProvidesTraits
Type Parameters
Name | Description |
---|---|
T | The type of data being represented by this trait |
Fields
k_ProvidedTraits
Declaration
protected static readonly TraitDefinition[] k_ProvidedTraits
Field Value
Type | Description |
---|---|
TraitDefinition[] |
Methods
AddTrait(Int32)
Add this trait to the associated SynthesizedObject in the MARS database
Declaration
public override sealed void AddTrait(int dataID)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dataID | The data ID which has been assigned to the associated SynthesizedObject |
Overrides
GetProvidedTraits()
Get the TraitDefinitions provided by this SynthesizedTrait
Declaration
public TraitDefinition[] GetProvidedTraits()
Returns
Type | Description |
---|---|
TraitDefinition[] | The provided traits |
Implements
GetTraitData()
Calculates and retrieves the most up-to-date piece of data representing this trait
Declaration
public abstract T GetTraitData()
Returns
Type | Description |
---|---|
T | The data for this trait |
RemoveTrait(Int32)
Remove this trait from the associated SynthesizedObject in the MARS database
Declaration
public override sealed void RemoveTrait(int dataID)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dataID | The data ID which has been assigned to the associated SynthesizedObject |
Overrides
UpdateTrait(Int32)
Remove the data for this trait in the MARS database
Declaration
public override sealed void UpdateTrait(int dataID)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dataID | The data ID which has been assigned to the associated SynthesizedObject |